Skip to content

LUNA PASS VIDEO#

LUNA PASS VIDEO allows you to create a video file based on the received set of frames and process it on the client side for further work with the file (saving, transfer, etc.).

LUNA PASS VIDEO performs splicing together a video file from a webcam or mobile app camera in a single session using the codec set in the settings.

The video file is assembled from the last N frames from the end of the session.

The number of frames from which the gluing should be performed is regulated in LUNA PASS settings.

  • In case if less than N frames are received during the session, LUNA PASS performs gluing from the available number of frames.
  • In case if more than N frames are received during the session, LUNA PASS performs gluing from the last N frames from the end of the session.

Video file gluing from frames is performed for all sessions independently of the result of estimations performed in LUNA PASS API or expiration of the number of attempts to pass certain checks.

To process the received video files it is necessary to create a file task.py (for example, by analogy with example_redis_task.py) and realize in it the logic of processing the received videos.

The name of the file directly depends on the parameter args.workerTask, which is set in the configuration of LUNA PASS API.

In case of reconnection at WebSocket session break, LUNA PASS VIDEO forms one common video file for one session ID and saves it to the storage.

Service setup#

In the configuration file config.toml enter the necessary settings corresponding to the current parameters of LUNA SDK and presented in the table (Table 10).

Table 10: LUNA PASS VIDEO configuration parameters

Parameter

Description *

VIDEO

codec

The codec used for video encoding (see Table 11 for details). Available values:

  • H265

  • H264

  • VP9

Default: H265

framesLimit=

Limit the maximum number of frames in a video

If the value is 0, the restriction is not applied

For values greater than 0, the last N frames are taken for the video

Default: 0

REDIS

connectionString=

Redis connection string

Default: redis://127.0.0.1:6379

queueName=

Name of the Redis video queue

Default: default

* The paths are specified from the LUNA SDK directory.

Replace the default redis://127.0.0.1 address with the address of the host where it runs, otherwise pages associated with these addresses will not appear in the interface.

Table 11. Estimation of available video encoding options (codecs)

Codec Type

h.264

h.265

VP9

Estimating Parameter

Video processing speed

×

×

Availability across devices

×

×

Compression ratio

×

×

High quality video

×

Availability of license restrictions

×