debug: capture raw2bmx output to log

This commit is contained in:
Zac Gaetano 2026-06-04 17:11:47 +00:00
parent 3c7cc1a77f
commit c2d15b4e3a

View file

@ -936,12 +936,8 @@ cleanup() { rm -f "$VF" "$AF"; [ -n "$PATCHPID" ] && kill "$PATCHPID" 2>/dev/nul
# Prime both FIFOs read-write (non-blocking) to break the open-order deadlock.
exec 7<>"$VF" 8<>"$AF"
# raw2bmx: close priming FDs (no stray writer) before exec so it sees real EOF.
# CRITICAL: redirect raw2bmx stdin from /dev/null so it does NOT inherit the
# parent bash stdin. When the video source is fc_pipe (framecache), bash stdin
# carries the raw video stream destined for ffmpeg's pipe:0 if raw2bmx also
# inherited fd 0 it would steal bytes from that stream, corrupting both the
# growing master and the ffmpeg input.
( exec 7>&- 8>&- 0</dev/null; exec ${bmxLine} ) &
# Capture raw2bmx stderr to /tmp/raw2bmx.log for debugging.
( exec 7>&- 8>&- 0</dev/null; exec ${bmxLine} >/tmp/raw2bmx.log 2>&1 ) &
BMXPID=$!
# ffmpeg: closes priming FDs and EXPLICITLY inherits bash stdin (fd 0) so that
# 'pipe:0' reads the fc_pipe video stream Node piped into this orchestrator's