[Libav-user] Decoding H264 frames on Windows

Carl Eugen Hoyos ceffmpeg at gmail.com
Mon Oct 3 14:45:32 EEST 2016


2016-10-03 12:52 GMT+02:00 Alex Grosu <agrosu at c-s.ro>:

> I am having some issues with time decoding H.264 frames with libavcodec. I
> am receiving 1920x1080 frames at 25 FPS, thus a frame should be displayed
> each 40 ms. But the decoding time per frame is between 55 ms and 83 ms, way
> too much.
> I am thinking at the following strategy: create 4 threads, each thread will
> decode a I-Frame slice (composed by SPS and PPS and IDR + all NACs until the
> next SPS&PPS&IDR). In theory, this should work on a >4CPUs processor.
> My question is: is there any other way in handling this kind of situation?

FFmpeg already contains a multi-threaded H.264 decoder: While it scales badly
I don't expect a wrapper implementation to work much better.
(Unless you really have full control over gop size, in this case you know
something that the FFmpeg decoder cannot know.)

Carl Eugen


More information about the Libav-user mailing list