fix(engine): remove -shortest from muxVideoWithAudio (#1648) (#1650)

FFmpeg 6.0 (bundled by ffmpeg-static) has a regression where -shortest
combined with -c:v copy over-truncates the video stream while leaving
audio untouched. The flag is also redundant — the audio mixer already
pads/caps all tracks to totalDuration via apad=whole_dur and -t.

Closes #1648
This commit is contained in:
Miguel Ángel
2026-06-22 17:06:03 -04:00
committed by GitHub
parent 3a6742bd13
commit e9957ecaf4
2 changed files with 26 additions and 2 deletions
+1 -1
View File
@@ -768,7 +768,7 @@ export async function muxVideoWithAudio(
// output container metadata. `-c:v copy` is retained; no re-encode.
args.push("-r", fpsToFfmpegArg(fps));
}
args.push("-shortest", "-y", outputPath);
args.push("-y", outputPath);
const processTimeout = config?.ffmpegProcessTimeout ?? DEFAULT_CONFIG.ffmpegProcessTimeout;
const result = await runFfmpeg(args, { signal, timeout: processTimeout });