From d42b8a0345ad0c2e236f09f1ac6d7e248a34afdd Mon Sep 17 00:00:00 2001 From: Mylloon Date: Fri, 4 Aug 2023 20:53:21 +0200 Subject: [PATCH] output stereo sound --- src/main.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.ts b/src/main.ts index 6b57011..b92e601 100644 --- a/src/main.ts +++ b/src/main.ts @@ -56,8 +56,9 @@ app.whenReady().then(() => { const outFile = getNewFilename(file, "(merged audio) "); // Merge 2 audio + // See: https://trac.ffmpeg.org/wiki/AudioChannelManipulation#a2stereostereo await execute( - `"${ffmpegPath}" -y -i "${file}" -filter_complex "[0:a]amerge=inputs=2[a]" -ac 1 -map 0:v -map "[a]" -c:v copy "${tmpFile}"` + `"${ffmpegPath}" -y -i "${file}" -filter_complex "[0:a]amerge=inputs=2[a]" -ac 2 -map 0:v -map "[a]" -c:v copy "${tmpFile}"` ).catch((e) => printAndDevTool(win, e)); // Add merged audio as first position to original video and make it default