8ee32b8df86756a4a56c17ef1fa48255eccf0ef5
The Node token-bucket pacer used HEAD-drop (emit frames in arrival order, drop newer ones when over budget). Under the encoder's ~330fps burst (ffmpeg -re does not reliably throttle YouTube-DASH webm), the viewer was watching frames ~10s behind live → frozen / 'patah-patah' video while audio (not rate-limited) played current = desync. Replace it with a steady setInterval emission clock at videoFps: each tick emits exactly ONE frame — the NEWEST buffered one — and discards everything older (tail-drop). At most one frame is ever held, so no backlog and no lag; the emit clock (not the encoder rate) defines playback speed. Keyframes are never superseded so the decoder keeps getting IDRs. Audio stays in sync.
Description
Bete Discord moderation watcher
26 MiB
Languages
TypeScript
95.5%
C++
1.2%
Nix
1%
Shell
0.7%
JavaScript
0.6%
Other
1%