StreamingSensorsParameters Struct Reference

Attributes

std::set< sl::SensorDeviceIdentifiersensors_ids = {}
 List of sensor id that will be used By default empty which means all available sensors in Sensors when the module is started. More...
 
STREAMING_CODEC codec = STREAMING_CODEC::H265
 Encoding used for streaming. More...
 
unsigned short port = 30000
 Port used for streaming. More...
 
unsigned int bitrate = 0
 Streaming bitrate (in Kbits/s) used for streaming. More...
 
int gop_size = -1
 GOP size in number of frames. More...
 
bool adaptative_bitrate = false
 Defines whether the adaptive bitrate is enabled. More...
 
unsigned short chunk_size = 16084
 Size of a single chunk. More...
 
unsigned int target_framerate = 0
 Framerate for the streaming output. More...
 

Variables

◆ sensors_ids

std::set<sl::SensorDeviceIdentifier> sensors_ids = {}

List of sensor id that will be used By default empty which means all available sensors in Sensors when the module is started.

◆ codec

Encoding used for streaming.

◆ port

unsigned short port = 30000

Port used for streaming.

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

◆ bitrate

unsigned int bitrate = 0

Streaming bitrate (in Kbits/s) used for streaming.

sl::STREAMING_CODEC sl::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

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

Note
Available range: [1000 - 60000]

◆ gop_size

int gop_size = -1

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 adaptative_bitrate = false

Defines whether the adaptive bitrate is enabled.

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 chunk_size = 16084

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 loss: this will generate more chunks for a single image, but each chunk sent will be lighter to avoid corruption within the chunk.
Increasing this value can decrease latency.


Note
Available range: [1024 - 65000]

◆ target_framerate

unsigned int target_framerate = 0

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.