diff --git a/services/capture/src/capture-manager.js b/services/capture/src/capture-manager.js index 6f3bafb..b0732ae 100644 --- a/services/capture/src/capture-manager.js +++ b/services/capture/src/capture-manager.js @@ -955,6 +955,14 @@ BMXPID=$! # harmless. ( exec 7>&- 8>&- 0<&0; exec ${ffLine} ) & FFPID=$! +# CRITICAL: the parent shell must DROP its own copy of stdin (fd 0) now that +# ffmpeg has inherited it. When video comes from fc_pipe (node pipes it to this +# orchestrator's stdin), leaving fd 0 open in the parent means BOTH the parent +# and the ffmpeg subshell hold the read end of that pipe — the kernel delivers +# bytes to whichever reads first, so ffmpeg is starved of the raw video and its +# filtergraph gets "No filtered frames" / empty output. Closing fd 0 here makes +# ffmpeg the SOLE reader so all fc_pipe video reaches pipe:0. +exec 0/dev/null; } trap stop INT TERM