Skip to main content

Multi-Stream Output Modes

When using multiple input streams, file, rtsp, and rtmp sinks support two output modes controlled by the mode field:

ModeBehaviorRequired field
single (default)All streams tiled into a single combined outputurl or path
multiEach input stream produces a separate outputstreams list with source_id

With mode: "multi", the streams list must have one entry per input stream, and each source_id must match a valid input stream.

How tiling works

With multiple streams in single mode, the SDK auto-arranges inputs in a grid layout (e.g., 2 streams = 1×2, 4 streams = 2×2, 6 streams = 2×3).

Sink behavior with multiple streams

Sink Typesingle modemulti mode
displayTiled grid (always)N/A
fileOne tiled fileOne file per stream
rtspOne tiled RTSP streamOne RTSP stream per input
rtmpOne tiled RTMP streamOne RTMP stream per input
kafkaAll frames to one topicN/A (includes source_id per message)
fpsMeasures overall FPSN/A