a2542493cd20ee30f6de548cf2028e463943fb32
getDirectVideoUrl used yt-dlp --get-url with bestvideo+bestaudio, which prints the video-only and audio-only URLs on SEPARATE lines. Only the first (video-only) line was used, so ffmpeg had no audio track and the GoLive stream had no sound. Replace with getDirectScreenInput which: - uses --dump-single-json to fetch both fresh URLs in ONE yt-dlp run (signature URLs expire quickly) - returns the merged progressive URL directly when one exists - otherwise merges the video-only + audio-only DASH URLs locally via a child ffmpeg into a single NUT stream consumed as a Readable - tracks the merge ffmpeg process in cleanup() so shutdown kills it too Verified end-to-end with real YouTube URLs: yt-dlp pair → live ffmpeg merge (NUT) → H264+opus transcode yields both streams. Added tests/screenShareInput.test.ts covering URL / DASH-pair / error paths.
Description
Bete Discord moderation watcher
26 MiB
Languages
TypeScript
97.2%
Nix
0.9%
Shell
0.8%
CSS
0.7%
PLpgSQL
0.4%