[FFmpeg-devel] Ticket 6375, Too many packets buffered for output stream

Reimar Döffinger Reimar.Doeffinger at gmx.de
Mon Jul 10 00:08:47 EEST 2017

On 09.07.2017, at 22:37, Hendrik Leppkes <h.leppkes at gmail.com> wrote:

> Either extremely badly intereleaved streams or streams that just start
> super late in the file have always been very problematic for decoding,
> resulting in various hacks over the years to add "best-guess" default
> values so at least something happens, even if the filtering has to
> resample/rescale to match that guess in the end.

Not sure if you're saying you want to avoid that?
My point was just, assuming it is even possible to have one frame for every stream is not really correct, and it's not JUST bad files.
But as an alternative suggestion, if you do not want obscure behaviour or hacks, maybe what really should happen is a better message?
Something like
"Stream A produced more data than could be buffered while waiting for first data on streams B, C and D. To fix this, please disable either stream A or streams B, C and D. Alternatively you can try to increase the buffer size (give option to increase)."
Another workaround might actually be to specify the input file multiple times (in the cases where that is possible), selecting different stream subsets each time.
Since disabling streams is of course not useful if the user really needs all of those (I don't think the ticket and current message has enough information to know if the problematic streams are actually useful).

More information about the ffmpeg-devel mailing list