bramp / ffmpeg-cli-wrapper

Java wrapper around the FFmpeg command line tool
BSD 2-Clause "Simplified" License
1.72k stars 413 forks source link

Handle failures during progress parsing more gracefully #333

Open icguy opened 4 months ago

icguy commented 4 months ago

I propose an option that allows progress parsing failures to be ignored. This way progress parsing can continue in the event of a one-time error that would have otherwise interrupted the parsing thread.

In #302 the progress parsing fails because of an unexpected input ("N/A" instead of a formatted timestamp) in the first progress event. Although #315 fixes this, there can arise other circumstances where parsing can fail. I propose a general solution, to allow these failures to be ignored altogether. In most scenarios the consumer doesn't care if every once in a while an event gets dropped as long as they get notified of the overall progress.

Euklios commented 3 months ago

Thanks for the proposal! I didn't consider that when implementing #315, but I'll look into it