[Libav-user] "Circular buffer overrun" error when reading UDP stream

Alex Cohn alexcohn at netvision.net.il
Sun Jul 28 19:39:23 CEST 2013

On Sun, Jul 28, 2013 at 5:57 PM, Adi Shavit <adishavit at gmail.com> wrote:
> Hi,
>   I'm decoding a UDP stream and getting "Circular buffer overrun. To
> avoid, increase fifo_size URL option. To survive in such case, use
> overrun_nonfatal option".
> How exactly do I :
> 1. "increase fifo_size URL option. "
> 2. "use overrun_nonfatal option".
> I couldn't find this is the docs.
> Thanks,
> Adi

See http://ffmpeg.gusari.org/viewtopic.php?f=12&t=624. For ffmpeg
command line, you can specify the UDP buffer size in the URL, e.g.

Buy if you get this message because you followed my advice about max
15 FPS, you are doing something wrong on your side: you should pull
the buffers faster. Did you add a sleep in the decoder loop? If your
client is at 100% CPU utilization,  faster settings for h264 decoder
may help.

The only "legitimate" case when increase of the fifo size may really
be the correct solution, is a slow, unreliable network. In such case,
UDP packets may arrive significantly out of order, and nothing but
fifo size will compensate that.

Note that overrun_nonfatal will break the video output. If the network
is very bad, and you have IDR frames sent often enough, or if you use
an intra-refresh stream.

Alex Cohn

More information about the Libav-user mailing list