( dir: string, inputPath: string, options: FfmpegOptions )
| 558 | } |
| 559 | |
| 560 | async function thumbnail( |
| 561 | dir: string, |
| 562 | inputPath: string, |
| 563 | options: FfmpegOptions |
| 564 | ): Promise<FfmpegResult> { |
| 565 | const outputPath = path.join(dir, 'out.jpg') |
| 566 | const command = ffmpeg(inputPath) |
| 567 | .seekInput(options.start ?? 0) |
| 568 | .frames(1) |
| 569 | await runCommand(command, outputPath) |
| 570 | return readOut(outputPath, 'jpg') |
| 571 | } |
| 572 | |
| 573 | export { extFromMime, mimeFromExt } |
no test coverage detected