[Libav-user] Buffered frames in avcodec h264 decoder

Hendrik Leppkes h.leppkes at gmail.com
Thu Dec 4 23:12:46 CET 2014


On Thu, Dec 4, 2014 at 2:31 PM, Alina lifshits <alina at vicon.co.il> wrote:

> Hello,
>
>
>
> I am using avcodec decoder to decode h264 stream. I noticed that the
> decoder buffers a few first frames before returning a decoded picture.
>
> The stream is from a live source and does not contains B frames. Is there
> a way to tell the decoder not to buffer frames, or maybe to buffer just 1
> or 2 at most?
>
> Since I am working with a live video, it very important for me to keep
> small latency.
>
>
>
>
>
To minimize latency, make sure you turn off frame-threaded decoding. You
can still use slice-threading (if your video has slices), but
frame-threading has an inherent delay.
Additionally, there is a flag to force low delay decoding, but I'm not
certain it work for H.264. You could look into that.

- Hendrik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20141204/098822fa/attachment.html>


More information about the Libav-user mailing list