AVPlumber · Mixer cookbook

3. Remove input hand-offs and unused metadata

Route packets directly to their decoder, keep native cadence, and avoid allocating per-frame strings that this mixer never reads.

Reviewed 15 October 2026 against e72ff8b4. These pages describe that code and named workload settings; they do not assert what every deployment runs.

Keep the graph small

The mixer defaults to canvas.input_routing: "input". input_rec routes selected streams directly to decoder edges, removing the per-file demux node and thread. The shared input-building helper retains its older demux default for other callers; this is not a blanket framework change. Use "demux" for a controlled mixer comparison.

The mixer passes frame_metadata=[] to disable the input recorder's timestamp dictionary stamping. The generic helper preserves metadata by default because replay-speed and team-processing consumers can require frame_ts. Do not remove those tags globally, and do not strip the capture identity used for browser delivery accounting.

Keep pacing; remove redundant resampling

Native-rate file inputs do not need a force_fps node before every fan-out. They still pass through realtime pacing; looped clips preserve continuous timestamps across the wrap. Browser sources retain their separate timestamp smoothing and repeat chain. Output frame-rate normalization remains part of output delivery.

Keep filters small too

NVDEC decoder options request threads=1. GPU and tag-only filter graphs avoid unnecessary FFmpeg worker pools. Source colour tags move to an existing fan-out when conversion is unnecessary; actual colour conversion must remain. These remove scheduling and allocation costs without reducing the frame rate or the number of independent inputs.

Evidence

The historical 192-source 1080p30 sequence measured mixer CPU at 502 → about 234% of one core and threads at 1,186 → 889 across multiple changes. Direct routing, metadata and queue signalling were measured together at 322 → 265% and removed 105 demux threads. These are measurements of the October 13–14 workload, not an independent attribution to each change or a fresh moving-browser capacity test. Original measurements and per-thread breakdown.

Verify the intended work still runs

Check each input's independent decode and timing, source identity through fan-out, loop-boundary cadence, and output pixels. Reducing node count should not suppress unseen input decoding or replace independent media with a shared texture. Validate metadata consumers before opting them out.

Implementation at the reviewed revision