6e7c4901c96d68d1538411e2931ea84088762c90
Root cause (revisited): the previous gate paused proc.stdout when vPipe was full. That stalled the SAME ffmpeg process that also writes audio on fd3, so audio stuttered; and the ~8s backlog already built never drained → permanent lag. Symptom: 'video still lags bad, now audio also choppy'. Fix: - spawn demuxer ffmpeg with -re for stream (pipe) input. Verified locally: a 5s NUT clip demuxes in 0.088s without -re (57x burst) vs 4.539s with -re (real-time). -re throttles the input read, which back-pressures the whole upstream chain (encoder x264 -> merge ffmpeg -> yt-dlp) through OS pipes, pinning production at 1x. No unbounded backlog. - drop oldest queued frame when vPipe readableLength >= 30 (transient sender stall guard) instead of pausing stdout — keeps video fresh and audio intact. - removed gateSource/sourcePaused entirely. Audio and video now pace together at 1x; video is the newest frame, not an 8-second-old one.
Description
Bete Discord moderation watcher
26 MiB
Languages
TypeScript
95.5%
C++
1.2%
Nix
1%
Shell
0.7%
JavaScript
0.6%
Other
1%