ffmpeg.wasm icon indicating copy to clipboard operation
ffmpeg.wasm copied to clipboard

Catch FFMPEG errors

Open julienbeisel opened this issue 3 years ago • 1 comments

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!

julienbeisel avatar Oct 27 '21 07:10 julienbeisel

image

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');
}

marcofugaro avatar Sep 09 '22 08:09 marcofugaro