Spawn an ffmpeg child process and wire up all event handling. Returns an FFmpegProcess immediately (process is already running).
const proc = spawnFFmpeg({ binary: 'ffmpeg', args: [...], parseProgress: true });proc.emitter.on('progress', (info) => console.log(info.percent));await new Promise((res, rej) => { proc.emitter.on('end', res); proc.emitter.on('error', rej);}); Copy
const proc = spawnFFmpeg({ binary: 'ffmpeg', args: [...], parseProgress: true });proc.emitter.on('progress', (info) => console.log(info.percent));await new Promise((res, rej) => { proc.emitter.on('end', res); proc.emitter.on('error', rej);});
Spawn an ffmpeg child process and wire up all event handling. Returns an FFmpegProcess immediately (process is already running).