Skip to content

Commit

Permalink
fix: properly escape params passed to ffmpeg
Browse files Browse the repository at this point in the history
fixes #95
  • Loading branch information
lightpohl committed Dec 11, 2024
1 parent 7a54937 commit 88df918
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ const runFfmpeg = async ({
return;
}

let command = `ffmpeg -loglevel quiet -i "${outputPath}"`;
let command = `ffmpeg -loglevel quiet -i ${escapeArgForShell(outputPath)}`;

if (bitrate) {
command += ` -b:a ${bitrate}`;
Expand Down Expand Up @@ -680,7 +680,7 @@ const runFfmpeg = async ({
}

const tmpMp3Path = `${outputPath}.tmp${ext}`;
command += ` "${tmpMp3Path}"`;
command += ` ${escapeArgForShell(tmpMp3Path)}`;
logMessage("Running command: " + command, LOG_LEVELS.debug);

try {
Expand Down

0 comments on commit 88df918

Please sign in to comment.