From 1e9fbe98a1a91c8bb77b8dbc7ba5d4cc97f25762 Mon Sep 17 00:00:00 2001 From: Maxime LAFARIE Date: Sun, 21 Sep 2025 12:39:43 +0200 Subject: [PATCH] fix: ffmpeg version check doesn't work --- src/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.ts b/src/index.ts index b851ea5..d8f96f1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -93,7 +93,7 @@ export class YtDlp { binaryProcess.on('exit', (code) => { binaryExists = code === 0; if (options?.ffmpeg) { - const ffmpegProcess = spawn(this.ffmpegPath!, ['--version']); + const ffmpegProcess = spawn(this.ffmpegPath!, ['-version']); ffmpegProcess.on('error', () => (ffmpegExists = false)); ffmpegProcess.on('exit', (code) => { ffmpegExists = code === 0; @@ -124,7 +124,7 @@ export class YtDlp { stdio: 'ignore', }); const ffmpegResult = options?.ffmpeg - ? spawnSync(this.ffmpegPath!, ['--version'], { stdio: 'ignore' }) + ? spawnSync(this.ffmpegPath!, ['-version'], { stdio: 'ignore' }) : { status: 0 }; return binaryResult.status === 0 && ffmpegResult.status === 0; }