Overview
Sinks consume upstream media and produce output - streams, files, or room publications.
Available types
Section titled “Available types”| Type | Description |
|---|---|
livekit | Publish to a LiveKit room |
jitsi | Publish to a Jitsi conference |
daily | Publish to a Daily room |
agora | Publish to an Agora channel |
rtmp_push | Push RTMP to CDNs |
srt_push | Push MPEG-TS over SRT |
whip | Push via WHIP |
segment | HLS segments to object storage |
image | Periodic screenshots to storage |
websocket | Send raw PCM or encoded audio access units |
{ "name": "out", "type": "rtmp_push", "inputs": ["mix_video", "mix_audio"], "config": { "encoding": { "videoCodec": "h264", "audioCodec": "aac" } }}An optional select on an object-form inputs entry filters which upstream tracks the sink receives on that edge.
Encoding
Section titled “Encoding”Many sinks accept an encoding block (EncodingConfig):
| Field | Type | Default | Description |
|---|---|---|---|
videoCodec | string | See below | Mux encoder opt-in: h264 | vp9 | av1. WebRTC sinks use it as a codec preference and also support vp8. |
audioCodec | string | See below | Mux encoder opt-in or WebRTC codec preference: aac or opus. |
audioProfile | string | — | AAC only: LC | HEv1 | HEv2. Ignored for Opus. |
videoBitrateBps | int | 0 (auto) | Target video bitrate. 0 = derive from resolution (see below). Clamped to 0–50_000_000 (50 Mbps). |
audioBitrateBps | int | 0 (auto) | Target audio bitrate. Clamped to 0–512_000 (512 kbps). |
keyframeIntervalSec | int | 2 | Keyframe (GOP) interval in seconds (max 10). GOP frame count is keyframeIntervalSec × upstream fps: video_mixer canvas.fps when wired, otherwise measured from frame timestamps before encode starts. |
For rtmp_push, srt_push, and segment, each codec must be explicit. An
omitted codec means that raw media type is not encoded or sent. WebRTC sinks
instead negotiate an available codec when the field is omitted; use
select.mediaTypes to disable an RTC audio or video track.
When videoBitrateBps is 0, the engine picks a bitrate from output width × height and codec (H.264 baseline ladder; AV1 / VP9 use lower multipliers).
For compositor output cadence, see video_mixer canvas.fps.
avflow manages output audio sample rate internally. Audio encode rates snap to {8000, 16000, 32000, 44100, 48000} Hz from upstream media (fallback 48000).
For rtmp_push, srt_push, and segment, this block is a compatibility
shortcut. The compiler expands it into video_encoder
and audio_encoder nodes; the sink then only muxes and
writes encoded packets. A missing codec does not encode that media, even when a
matching raw track is present. Equivalent generated encoders are shared, and a
Job may contain at most one video encoder after expansion. RTC sinks, including
WHIP, keep encoding as an SDK codec/bitrate hint and accept raw media only.
Pricing
Section titled “Pricing”Video sinks are billed by encoded resolution × fps tier and codec. Audio is a
separate additive line that uses the audio sink rate.