output stereo sound

This commit is contained in:
Mylloon 2023-08-04 20:53:21 +02:00
parent 01b4cdcc03
commit d42b8a0345
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -56,8 +56,9 @@ app.whenReady().then(() => {
const outFile = getNewFilename(file, "(merged audio) "); const outFile = getNewFilename(file, "(merged audio) ");
// Merge 2 audio // Merge 2 audio
// See: https://trac.ffmpeg.org/wiki/AudioChannelManipulation#a2stereostereo
await execute( 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)); ).catch((e) => printAndDevTool(win, e));
// Add merged audio as first position to original video and make it default // Add merged audio as first position to original video and make it default