fix: add FFMPEG_OUTPUT_ARGS (#470)

This commit is contained in:
Emrik Östling 2025-12-14 14:12:21 +01:00 committed by GitHub
parent 12a5580694
commit df3330fdc2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 8 additions and 4 deletions

View file

@ -730,11 +730,14 @@ export async function convert(
// Parse FFMPEG_ARGS environment variable into array
const ffmpegArgs = process.env.FFMPEG_ARGS ? process.env.FFMPEG_ARGS.split(/\s+/) : [];
const ffmpegOutputArgs = process.env.FFMPEG_OUTPUT_ARGS
? process.env.FFMPEG_OUTPUT_ARGS.split(/\s+/)
: [];
return new Promise((resolve, reject) => {
execFile(
"ffmpeg",
["-i", filePath, ...ffmpegArgs, ...extraArgs, targetPath],
[...ffmpegArgs, "-i", filePath, ...ffmpegOutputArgs, ...extraArgs, targetPath],
(error, stdout, stderr) => {
if (error) {
reject(`error: ${error}`);