From 9adcae032917704a37525418e7cf6fc2dd2cebd3 Mon Sep 17 00:00:00 2001 From: ZGaetano Date: Mon, 1 Jun 2026 16:10:21 -0400 Subject: [PATCH] fix(capture): connect deltacast growing-master filtergraph (split output 1 unconnected) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The growing-master ffmpeg orchestrator declared split=2[vhi][vlo] but only consumed [vlo] inside the `if (hlsDir)` block. For deltacast sources the caller passed hlsDir=null (the ternary only matched sourceType==='sdi'), so [vlo] was left unconnected → ffmpeg aborted with "Filter 'split' has output 1 (vlo) unconnected" / "Error binding filtergraph inputs/outputs" → 0 frames → no HLS → "playback failed" on all deltacast previews. Fix: - Pass sdiHlsDir for deltacast as well as sdi (deltacast also produces the 2nd-output HLS preview from the single SDI read). - Make the orchestrator filter_complex conditional: split=2[vhi][vlo] when an HLS dir is present, split=1[vhi] (master only) otherwise, so no split output is ever orphaned regardless of source type. Restores deltacast growing-master capture (master MXF + HLS preview). No poster tap (the incomplete recorder-thumbnails poster on the deploy node added an mjpeg output that destabilised the shared ffmpeg; tracked separately on the feature/recorder-thumbnails branch). Co-Authored-By: Claude Opus 4.8 --- services/capture/src/capture-manager.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/services/capture/src/capture-manager.js b/services/capture/src/capture-manager.js index 60cf556..d225dd5 100644 --- a/services/capture/src/capture-manager.js +++ b/services/capture/src/capture-manager.js @@ -689,9 +689,16 @@ class CaptureManager { // (which would otherwise abort the video/audio outputs and produce nothing). const ff = ['ffmpeg', '-y', '-hide_banner', '-loglevel', 'warning', '-stats']; // SDI input is interlaced; yadif then split into the master + preview taps. + // When there's an HLS dir we split the decode into the master ([vhi]) and + // the H.264 preview ([vlo]); with no HLS dir, split=1 (master only) so no + // split output is ever left unconnected (deltacast growing master had no + // HLS dir, leaving [vlo] orphaned -> 'split output 1 (vlo) unconnected'). + const filterComplex = hlsDir + ? '[0:v]yadif=mode=1:deint=1,split=2[vhi][vlo]' + : '[0:v]yadif=mode=1:deint=1,split=1[vhi]'; const ffArgs = [ ...inputArgs, - '-filter_complex', '[0:v]yadif=mode=1:deint=1,split=2[vhi][vlo]', + '-filter_complex', filterComplex, // (a) MPEG-2 422 elementary video → "$VF" '-map', '[vhi]', ...GROWING_VIDEO_ELEMENTARY_ARGS, @@ -982,7 +989,7 @@ exit "$BMXRC" framerate, audioChannels, outPath: growingPath, - hlsDir: (sourceType === 'sdi') ? sdiHlsDir : null, + hlsDir: (sourceType === 'sdi' || sourceType === 'deltacast') ? sdiHlsDir : null, videoCodec, audioMap, });