RecordingParameters Class Reference

Class containing the options used to record. More...

Functions

RecordingParameters __cinit__ (self, video_filename="myRecording.svo2", compression_mode=SVO_COMPRESSION_MODE.H265, target_framerate=0, bitrate=0, transcode_streaming_input=False, encryption_key="", encoding_preset=SVO_ENCODING_PRESET.DEFAULT)
 Default constructor. More...
 
str video_filename (self)
 Filename of the file to save the recording into.
 
SVO_COMPRESSION_MODE compression_mode (self)
 Compression mode the recording. More...
 
int target_framerate (self)
 Framerate for the recording file. More...
 
int bitrate (self)
 Overrides the default bitrate of the SVO file, in kbits/s. More...
 
bool transcode_streaming_input (self)
 Defines whether to decode and re-encode a streaming source. More...
 
str encryption_key (self)
 Optional encryption key or passphrase to protect the SVO file. More...
 
SVO_ENCODING_PRESET encoding_preset (self)
 Encoding preset for the hardware encoder. More...
 

Detailed Description

Class containing the options used to record.

The default constructor sets all parameters to their default settings.

Note
Parameters can be adjusted by the user.

Functions

◆ __cinit__()

RecordingParameters __cinit__ (   self,
  video_filename = "myRecording.svo2",
  compression_mode = SVO_COMPRESSION_MODE.H265,
  target_framerate = 0,
  bitrate = 0,
  transcode_streaming_input = False,
  encryption_key = "",
  encoding_preset = SVO_ENCODING_PRESET.DEFAULT 
)

Default constructor.

All the parameters are set to their default values.

Parameters
video_filename: Chosen video_filename
compression_mode: Chosen compression_mode
target_framerate: Chosen target_framerate
bitrate: Chosen bitrate
transcode_streaming_input: Enables transcode_streaming_input
encoding_preset: Chosen encoding_preset
params = sl.RecordingParameters(video_filename="record.svo",compression_mode=SVO_COMPRESSION_MODE.H265)

◆ compression_mode()

SVO_COMPRESSION_MODE compression_mode (   self)

Compression mode the recording.

Default: sl.SVO_COMPRESSION_MODE.H265

Referenced by RecordingParameters.__cinit__().

◆ target_framerate()

int target_framerate (   self)

Framerate for the recording file.

Default: 0 (camera framerate will be taken)

Warning
This framerate must be below or equal to the camera framerate and camera framerate must be a multiple of the target framerate.
It means that it must respect camera_frameratetarget_framerate == 0.
Allowed framerates are 15,30, 60 or 100 if possible.
Any other values will be discarded and camera FPS will be taken.

Referenced by StreamingParameters.__cinit__(), and RecordingParameters.__cinit__().

◆ bitrate()

int bitrate (   self)

Overrides the default bitrate of the SVO file, in kbits/s.

Default: 0 (the default values associated with the resolution)

Note
Only works if compression_mode is H264 or H265.
Available range: 0 or [1000 - 60000]

Referenced by StreamingParameters.__cinit__(), and RecordingParameters.__cinit__().

◆ transcode_streaming_input()

bool transcode_streaming_input (   self)

Defines whether to decode and re-encode a streaming source.

Default: False

Note
If set to False, it will avoid decoding/re-encoding and convert directly streaming input into a SVO file.
This saves a encoding session and can be especially useful on NVIDIA Geforce cards where the number of encoding session is limited.
compression_mode, target_framerate and bitrate will be ignored in this mode.

Referenced by RecordingParameters.__cinit__().

◆ encryption_key()

str encryption_key (   self)

Optional encryption key or passphrase to protect the SVO file.

When set, the SVO file is AES-256-CTR encrypted on the fly during recording. The same value must be provided in InitParameters.svo_decryption_key for playback.

The value is interpreted as follows:

  • If it points to an existing file containing a 32-byte binary key (or 64 hex characters), it is used as a raw AES-256 key.
  • If it is a 64-character hexadecimal string, it is used directly as a raw AES-256 key.
  • Otherwise, it is treated as a passphrase and a key is derived via PBKDF2-SHA256.

Default: "" (no encryption)

Note
Requires OpenSSL (libcrypto) to be available on the system at runtime.

Referenced by RecordingParameters.__cinit__().

◆ encoding_preset()

SVO_ENCODING_PRESET encoding_preset (   self)

Encoding preset for the hardware encoder.

Controls the speed/quality tradeoff of the GPU encoder. Default: SVO_ENCODING_PRESET.DEFAULT

Note
Only applicable when compression_mode is H264 or H265.

Referenced by RecordingParameters.__cinit__().