( dir: string, inputPath: string, options: FfmpegOptions )
| 534 | } |
| 535 | |
| 536 | async function extractAudio( |
| 537 | dir: string, |
| 538 | inputPath: string, |
| 539 | options: FfmpegOptions |
| 540 | ): Promise<FfmpegResult> { |
| 541 | const ext = (options.format || 'mp3').toLowerCase() |
| 542 | const outputPath = path.join(dir, `out.${ext}`) |
| 543 | const command = ffmpeg(inputPath).noVideo() |
| 544 | await runCommand(command, outputPath) |
| 545 | return readOut(outputPath, ext) |
| 546 | } |
| 547 | |
| 548 | async function convert( |
| 549 | dir: string, |
no test coverage detected