SL_StreamingParameters Struct Reference

Structure containing the options used to stream with the ZED SDK. More...

Data Fields

enum SL_STREAMING_CODEC codec
 Encoding used for streaming.
 
unsigned short port
 Port used for streaming. More...
 
unsigned int bitrate
 Defines the streaming bitrate in Kbits/s. More...
 
int gop_size
 GOP size in number of frames. More...
 
bool adaptative_bitrate
 Defines whether the adaptive bitrate is enable. More...
 
unsigned short chunk_size
 Size of a single chunk. More...
 
unsigned int target_framerate
 Framerate for the streaming output. More...
 

Detailed Description

Structure containing the options used to stream with the ZED SDK.

Note
Parameters can be adjusted by the user.

Field Documentation

◆ port

unsigned short SL_StreamingParameters::port

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.

SL_STREAMING_CODEC SL_RESOLUTION FPS bitrate (kbps)
SL_STREAMING_CODEC_H264 SL_RESOLUTION_HD2K 15 8500
SL_STREAMING_CODEC_H264 SL_RESOLUTION_HD1080 30 12500
SL_STREAMING_CODEC_H264 SL_RESOLUTION_HD720 60 7000
SL_STREAMING_CODEC_H265 SL_RESOLUTION_HD2K 15 7000
SL_STREAMING_CODEC_H265 SL_RESOLUTION_HD1080 30 11000
SL_STREAMING_CODEC_H265 SL_RESOLUTION_HD720 60 6000

Default: 0 (it will be set to the best value depending on your resolution/FPS)

Note
Available range: [1000 - 60000]

◆ gop_size

int SL_StreamingParameters::gop_size

GOP size in number of frames.

Default: -1 (the GOP size will last at maximum 2 seconds, depending on camera FPS)

Note
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

Defines whether the adaptive bitrate is enable.

Default: false

Note
Bitrate will be adjusted depending the number of packet dropped during streaming.
If activated, the 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

Size of a single chunk.

Default: 16084

Note
Stream buffers are divided into X number of chunks where each chunk is chunk_size bytes long.
You can lower chunk_size 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.


Note
Available range: [1024 - 65000]

◆ target_framerate

unsigned int SL_StreamingParameters::target_framerate

Framerate for the streaming output.

Default: 0 (camera framerate will be taken)

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.