(command: ffmpeg.FfmpegCommand, outputPath: string)
| 204 | } |
| 205 | |
| 206 | function runCommand(command: ffmpeg.FfmpegCommand, outputPath: string): Promise<void> { |
| 207 | return new Promise<void>((resolve, reject) => { |
| 208 | command |
| 209 | .on('end', () => resolve()) |
| 210 | .on('error', (err) => reject(new Error(`FFmpeg error: ${err.message}`))) |
| 211 | .save(outputPath) |
| 212 | }) |
| 213 | } |
| 214 | |
| 215 | export async function probeMedia(file: MediaFile): Promise<MediaProbe> { |
| 216 | return withTempDir(async (dir) => { |
no test coverage detected