[Libav-user] avcodec_decode_video2 latency.

Hendrik Leppkes h.leppkes at gmail.com
Thu Nov 19 12:34:51 CET 2015


On Thu, Nov 19, 2015 at 12:22 PM, Jean-Yves Avenard <jyavenard at gmail.com> wrote:
> Hi
>
> Started to use FFmpeg/ffvp9 to decode VP9 streams in place of libvpx ;
> the gain in performance is very welcome.
>
> However, the major issue is the latency added by libavcodec ; when
> feeding avcodec_decode_video2 with samples, it won't return decoded
> frames until 16 frames have been buffered (this is the same with h264
> btw).
>
> That makes ffvp9 unusable for any real-time video conference (such as webrtc).
>
> libvpx will immediately output a decoded frame, with 0 latency.
>
> Is there a way to set to AVCodecContext so it outputs frame much quicker ?
>

Disable frame threaded decoding, it'll disable one of the performance
benefits of ffvp9, however frame threading always adds an delay equal
to the number of threads used.

- Hendrik


More information about the Libav-user mailing list