[Libav-user] Speeding up H264 decoding

Przemysław Sobala przemyslaw.sobala at gmail.com
Mon Sep 19 11:22:04 EEST 2016

W dniu 07.09.2016 o 17:59, Kristijonas Malisauskas pisze:
> First thing i would suggest doing is setting your AVCodecContext to 
> use more threads
> for ex: videoCtx->thread_count = 4;
I've done that and have a significant decoding speedup with some files 
but now some other mp4 files fail with:

[libx264 @ 0x3751e20] invalid DTS: PTS is less than DTS

[mp4 @ 0x35a05e0] pts (1548) < dts (2408) in stream 1

I'm using a modified transcoding.c example that handles my sample mp4 
file correctly with thread_count=1 and fails with 0 , >1 or "auto".

What has to be taken into consideration when using multithreaded decoding?

Przemyław Sobala

More information about the Libav-user mailing list