SL_StreamingParameters Struct Reference

Sets the streaming parameters. More...

Data Fields

enum SL_STREAMING_CODEC codec
 Defines the codec used for streaming. More...
 
unsigned short port
 Defines the port used for streaming. More...
 
unsigned int bitrate
 Defines the streaming bitrate in Kbits/s. More...
 
int gop_size
 Defines the gop size in number of frames. More...
 
bool adaptative_bitrate
 Enable/Disable adaptive bitrate. More...
 
unsigned short chunk_size
 Defines a single chunk size. More...
 
unsigned int target_framerate
 defines the target framerate for the streaming output. More...
 

Detailed Description

Sets the streaming parameters.

Note
Parameters can be user adjusted.

Field Documentation

◆ codec

enum SL_STREAMING_CODEC SL_StreamingParameters::codec

Defines the codec used for streaming.

Warning
If HEVC is used, make sure the receiving host is compatible with H265 decoding (Pascal NVIDIA card or newer). If not, prefer to use H264 since every compatible NVIDIA card supports H264 decoding

◆ port

unsigned short SL_StreamingParameters::port

Defines the port used for streaming.

Warning
Port must be an even number. Any odd number will be rejected.
Port must be opened.

◆ bitrate

unsigned int SL_StreamingParameters::bitrate

Defines the streaming bitrate in Kbits/s.

STREAMING_CODEC Resolution FPS bitrate (kbps)
H264 HD2K 15 8500
H264 HD1080 30 12500
H264 HD720 60 7000
H265 HD2K 15 7000
H265 HD1080 30 11000
H265 HD720 60 6000
Note
Available range : [1000 - 60000]

◆ gop_size

int SL_StreamingParameters::gop_size

Defines the gop size in number of frames.

Note
if value is set to -1, the gop size will last at maximum 2 seconds, depending on camera fps.
The gop size determines the maximum distance between IDR/I-frames. Very high GOP size will result in slightly more efficient compression, especially on static scenes. But latency will increase.
maximum value: 256

◆ adaptative_bitrate

bool SL_StreamingParameters::adaptative_bitrate

Enable/Disable adaptive bitrate.

Note
Bitrate will be adjusted depending the number of packet dropped during streaming.
if activated, bitrate can vary between [bitrate/4, bitrate]
Warning
Currently, the adaptive bitrate only works when "sending" device is a NVIDIA Jetson (X1,X2,Xavier,Nano)

◆ chunk_size

unsigned short SL_StreamingParameters::chunk_size

Defines a single chunk size.

Note
Stream buffers are divided in X number of chunk where each chunk is "chunk_size" bytes long.
Default value is 16084. You can lower this value if network generates a lot of packet lost : this will generates more chunk for a single image, but each chunk sent will be lighter to avoid inside-chunk corruption. Increasing this value can decrease latency.
Available range : [4096 - 65000]

◆ target_framerate

unsigned int SL_StreamingParameters::target_framerate

defines the target framerate for the streaming output.

Warning
This framerate must be below or equal to the camera framerate. Allowed framerates are 15,30, 60 or 100 if possible. Any other values will be discarded and camera FPS will be taken. \ndefault : 0, meaning that the camera framerate will be taken