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 number of frames (N) from which the gluing should be performed is regulated in LUNA PASS configuration parameter args.framesLimit:

  • in case when 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 received video files, create a task.py file (for example, similar to /lunapassvideo/example_redis_task.py) and implement the logic for processing received videos in it.

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#

Enter the settings corresponding to the current parameters of LUNA SDK in the configuration file config.toml (Table 10).

Table 10. LUNA PASS VIDEO configuration parameters

Parameter

Description

Default value

VIDEO

codec

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

  • H265

  • H264

  • VP9

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

0

REDIS

connectionString

Redis connection string

redis://127.0.0.1:6379

queueName

Name of the Redis video queue

default

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 video encoding types (codecs)

Estimating Parameter

h.264

h.265

VP9

Video processing speed

×

×

Availability across devices

×

×

Compression ratio

×

×

High quality video

×

Availability of license restrictions

×