Wiring & DAG
AVFlow builds a directed acyclic graph (DAG) from each component’s inputs array.
Basic rules
Section titled “Basic rules”- Sources have no
inputs— they produce media. - Nodes consume one or more upstream components and produce processed media.
- Sinks consume upstream components and write output (stream, file, room, etc.).
- Every
inputsentry must reference an existing component byname. - The graph must be acyclic.
Media types
Section titled “Media types”Components exchange video, audio, and optionally captions (from ASR). AVFlow infers which streams to pass when you connect components — you rarely need manual split nodes.
Use select to filter by participant identity, track type, or media type. On RTC sources it lives inside config; on nodes and sinks it is a top-level field.
Common patterns
Section titled “Common patterns”Source → sink (relay)
Section titled “Source → sink (relay)”A relay has no processing nodes: the source connects straight to the sink. This works for pull sources (rtmp_pull, whep_pull, srt_pull, file_pull) and 1:1 sinks such as rtmp_push.
rtmp_pull ──► rtmp_pushSource → mixers → sink (mix)
Section titled “Source → mixers → sink (mix)”RTC room sources (livekit, jitsi, daily, agora) are multi-stream (1:n) and need a mix — video_mixer and audio_mixer — before rtmp_push or similar 1:1 sinks, even for a single participant.
Composite recording
Section titled “Composite recording”Same mix pattern as above, often with a segment sink:
livekit ──► video_mixer ──► rtmp_push └──► audio_mixer ──┘ASR captions
Section titled “ASR captions”Wire the ASR node into sinks that support subtitles (segment, rtmp_push, RTC sinks, etc.).
livekit ──► audio_mixer ──► segment └──► asr ──────────┘Validation errors
Section titled “Validation errors”Jobs are rejected at submit time if:
- A
1:1RTC sink (e.g.rtmp_push) is wired directly to a multi-participant RTC source without a mixer segmentis connected directly to a multi-track RTC source (use mixers first)- Input limits are exceeded
Fix the topology and resubmit — AVFlow does not partially run invalid graphs.