7983701b03da1cbbc9c337534460113c08cfcd56
Symptom: cross-machine streams drifted ~6-9 seconds per minute. mpv showed continuous "Audio device underrun detected" with video packets piling up in its demuxer queue while audio queue stayed at 0. Root causes: - pipewiresrc captured at the host monitor's refresh rate (180Hz), not at the configured framerate. The encoder + mux produced 6x more frames per wallclock second than mpv could consume at realtime, burying audio packet density in mpv's demuxer queue. - `--profile=low-latency` sets `audio-buffer=0`, which is too aggressive — any sub-millisecond network jitter immediately starves the audio device. Underruns slowed mpv's audio clock, and with `video-sync=audio` (also from low-latency profile) video followed. Fixes: - `videorate ! video/x-raw,framerate=<fps>/1` after pipewiresrc to cap input to the requested rate deterministically. - mpv command grows `--audio-buffer=0.2 --demuxer-max-bytes=2M --demuxer-readahead-secs=0.5`: small audio buffer to absorb network jitter, demuxer cap to prevent runaway buildup. A leaky-queues attempt landed and was reverted in the same commit — it removed backpressure without addressing the root cause and made things worse. Verified cross-machine 6m51s: drift held at ~1s floor, zero audio underruns, perfect A-V sync. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Description
No description provided
Languages
Rust
97.6%
Shell
2.4%