diff --git a/.gitignore b/.gitignore index 8b91ab0..18caa91 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,8 @@ node_modules/ .next/ .env +.env.prod +.env.local *.log storage/ worker/worker.pid diff --git a/bin/ffmpeg.exe b/bin/ffmpeg.exe new file mode 100644 index 0000000..5dceefd Binary files /dev/null and b/bin/ffmpeg.exe differ diff --git a/bin/ffprobe b/bin/ffprobe new file mode 100644 index 0000000..571e273 Binary files /dev/null and b/bin/ffprobe differ diff --git a/bin/ffprobe.exe b/bin/ffprobe.exe new file mode 100644 index 0000000..d5a5567 Binary files /dev/null and b/bin/ffprobe.exe differ diff --git a/src/lib/ytdlp.ts b/src/lib/ytdlp.ts index 1689d1e..57c38bd 100644 --- a/src/lib/ytdlp.ts +++ b/src/lib/ytdlp.ts @@ -55,7 +55,9 @@ export function buildYtdlpArgs(params: YtdlpParams): string[] { const args: string[] = ['--no-playlist', '-o', outputTemplate] - const ffmpegBin = path.join(config.BIN_DIR, 'ffmpeg') + // bin/ffmpeg is a Linux ELF binary bundled for o2switch prod deploy; it can't + // run on Windows, so local dev instead looks for a bin/ffmpeg.exe. + const ffmpegBin = path.join(config.BIN_DIR, process.platform === 'win32' ? 'ffmpeg.exe' : 'ffmpeg') if (existsSync(ffmpegBin)) { args.push('--ffmpeg-location', ffmpegBin) }