From b52b681a93c3d49ce9c7ae09abbca23b62bb1d5c Mon Sep 17 00:00:00 2001 From: Saylee12R Date: Sat, 20 Jun 2026 14:03:42 +0530 Subject: [PATCH] fix: prevent infinite export when looping background music --- src/lib/ffmpeg.worker.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/ffmpeg.worker.ts b/src/lib/ffmpeg.worker.ts index f72ef583..bf2a5f9e 100644 --- a/src/lib/ffmpeg.worker.ts +++ b/src/lib/ffmpeg.worker.ts @@ -312,7 +312,9 @@ interface PositionCoords { const outputDuration = sourceDuration / recipe.speed; args.push("-t", outputDuration.toFixed(6)); } - + if (hasMusicTrack) { + args.push("-shortest"); + } args.push(outputName); return args; }