( dir: string, inputPath: string, options: FfmpegOptions )
| 546 | } |
| 547 | |
| 548 | async function convert( |
| 549 | dir: string, |
| 550 | inputPath: string, |
| 551 | options: FfmpegOptions |
| 552 | ): Promise<FfmpegResult> { |
| 553 | if (!options.format) throw new Error('convert requires a target format') |
| 554 | const ext = options.format.toLowerCase() |
| 555 | const outputPath = path.join(dir, `out.${ext}`) |
| 556 | await runCommand(ffmpeg(inputPath), outputPath) |
| 557 | return readOut(outputPath, ext) |
| 558 | } |
| 559 | |
| 560 | async function thumbnail( |
| 561 | dir: string, |
no test coverage detected