(envName: string, binaryName: "ffmpeg" | "ffprobe")
| 31 | } |
| 32 | |
| 33 | function getConfiguredBinary(envName: string, binaryName: "ffmpeg" | "ffprobe"): string { |
| 34 | const configured = process.env[envName]?.trim(); |
| 35 | if (configured) return resolve(configured); |
| 36 | return findOnPath(binaryName) ?? binaryName; |
| 37 | } |
| 38 | |
| 39 | export function getFfmpegBinary(): string { |
| 40 | return getConfiguredBinary(FFMPEG_PATH_ENV, "ffmpeg"); |
no test coverage detected