ffmpeg.wasm
ffmpeg.wasm copied to clipboard
Catch FFMPEG errors
I'd like to be able to catch errors programmatically.
The API allows me to check the progress and the loggers, do you know if I can also catch errors ? A workaround would be to listen to the logger and when "failed" is written I would know it failed, but I'm looking for a more performant solution.
Thanks!

I've got errors as well, I've been checking the length of the output buffer
const data = ffmpeg.FS('readFile', 'video.mp4');
if (data.length <= 48) {
throw new Error('Empty video');
}