Open fa0311 opened 1 week ago
import { default as ffmpeg, default as ffprobe } from "fluent-ffmpeg"; const command = ffmpeg(); command.input("anullsrc=channel_layout=mono:sample_rate=44100"); command.inputFormat("lavfi"); command.addOption("-t", "20"); command.output("test.mp4") command.run();
(note: if the problem only happens with some inputs, include a link to such an input file)
Error: Input format lavfi is not available
// TypeScript const bypass = (command: ffmpeg.FfmpegCommand) => { const bk = command.availableFormats; command.availableFormats = (cb: (err: any, data: any) => void) => { bk.bind(command)((err, data) => { const lavfi = { canDemux: true, canMux: true, description: "Lavfi", }; cb(err, { ...data, lavfi }); }); }; }
Version information
Code to reproduce
(note: if the problem only happens with some inputs, include a link to such an input file)
Expected results
Observed results
Temporary workaround
Checklist