Multibitrate ingest¶
The mbr input combines several renditions of one signal into one stream. It keeps every track from the first source, including audio, and takes only video from the other sources. Audio from additional sources is discarded.
Configuration¶
streams:
- name: cam1
inputs:
- mbr:
inputs:
- rtsp:
url: rtsp://admin:password@10.0.0.5/stream0
- rtsp:
url: rtsp://admin:password@10.0.0.5/stream1
| Parameter | Description |
|---|---|
mbr.inputs |
List of child inputs. Each item has the same structure as a regular stream input. Put the source with the required audio first. |
Transport and codecs¶
MBR has no transport of its own: each child input defines its connection. Supported codecs depend on those inputs and the selected playback protocol. MBR merges tracks without re-encoding.
Alignment and LL-HLS¶
For adaptive switching, renditions must represent the same instant of the signal: timestamps and GOP boundaries with corresponding keyframes must be perfectly aligned. Source order defines input composition; do not treat it as a guarantee of playlist rendition order.
Cameras generally do not provide this alignment. Sapsan uses complex timeline normalization and segmentation mechanisms to compensate for incompatibilities between camera multibitrate streams and modern protocols, including LL-HLS. This does not create missing keyframes or guarantee repair of every incompatible GOP. Test switching and live latency with the actual signal.
Errors and configuration changes¶
If any branch fails to open, the whole MBR input fails to start and already opened branches close. If a branch ends or reports an error during operation, the whole MBR input closes and the cause is forwarded to the LSI input mechanism. LSI handles reconnects and backup input selection; MBR has no separate reconnect loop. The common source_open_timeout bounds opening the entire ladder.
Changing mbr.inputs requires restarting the input and reopening every branch. Applying an unchanged configuration does not restart MBR.
Alternative: transcoding¶
For a single source, or to create aligned renditions afresh, use the transcoder.