From 7d6b4eb465a090dfeb8a01c6d512a2fa9f3e6080 Mon Sep 17 00:00:00 2001 From: Mylloon Date: Mon, 31 Jul 2023 13:20:38 +0200 Subject: [PATCH] fix for windows --- src/main.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/main.ts b/src/main.ts index 9aad312..88992f2 100644 --- a/src/main.ts +++ b/src/main.ts @@ -77,13 +77,10 @@ const reduceSize = (file: string, bitrate: number) => { /* Trash the output, depends on the platform */ const nul = isWindows ? "NUL" : "/dev/null"; - /* AND operator, depends on the platform */ - const and = isWindows ? "^" : "&&"; - const finalFile = getNewFilename(file, "Compressed - "); child_process.execSync( - `${ffmpegPath} -y -i "${file}" -c:v libx264 -b:v ${videoBitrate}k -pass 1 -an -f null ${nul} ${and} \ + `${ffmpegPath} -y -i "${file}" -c:v libx264 -b:v ${videoBitrate}k -pass 1 -an -f null ${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 "${finalFile}"` );