add quotes for executable
This commit is contained in:
parent
5609647e55
commit
dda9b99721
1 changed files with 4 additions and 4 deletions
|
@ -55,12 +55,12 @@ app.whenReady().then(() => {
|
|||
|
||||
// Merge 2 audio
|
||||
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 1 -map 0:v -map "[a]" -c:v copy "${tmpFile}"`
|
||||
).catch((e) => printAndDevTool(win, e));
|
||||
|
||||
// Add merged audio as first position to original video
|
||||
await execute(
|
||||
`${ffmpegPath} -y -i "${tmpFile}" -i "${file}" -map 0 -map 1:a -c:v copy "${outFile}"`
|
||||
`"${ffmpegPath}" -y -i "${tmpFile}" -i "${file}" -map 0 -map 1:a -c:v copy "${outFile}"`
|
||||
).catch((e) => printAndDevTool(win, e));
|
||||
|
||||
// Delete the temporary file
|
||||
|
@ -87,8 +87,8 @@ app.whenReady().then(() => {
|
|||
const nul = process.platform === "win32" ? "NUL" : "/dev/null";
|
||||
|
||||
await execute(
|
||||
`${ffmpegPath} -y -i "${file}" -c:v libx264 -b:v ${videoBitrate}k -pass 1 -an -f mp4 ${nul} && \
|
||||
${ffmpegPath} -y -i "${file}" -c:v libx264 -b:v ${videoBitrate}k -pass 2 -c:a copy -map 0:0 -map 0:1 -map 0:2 -map 0:3 -f mp4 "${finalFile}"`
|
||||
`"${ffmpegPath}" -y -i "${file}" -c:v libx264 -b:v ${videoBitrate}k -pass 1 -an -f mp4 ${nul} && \
|
||||
"${ffmpegPath}" -y -i "${file}" -c:v libx264 -b:v ${videoBitrate}k -pass 2 -c:a copy -map 0:0 -map 0:1 -map 0:2 -map 0:3 -f mp4 "${finalFile}"`
|
||||
).catch((e) => printAndDevTool(win, e));
|
||||
|
||||
// Delete the old file
|
||||
|
|
Loading…
Reference in a new issue