[Libav-user] Options to minimize decoder CPU use

Carl Eugen Hoyos cehoyos at ag.or.at
Fri Dec 7 09:33:25 CET 2012


Jason Livingston <jettoblack at ...> writes:

> When decoding MPEG-2 or H.264 video with lavc, what decoder 
> flags or options can I use to decode as quickly as possible?

Do I understand you correctly that you want to maximize CPU use?

[...]

> I see AVCodecContext has some options such as skip_idct and
> skip_loop_filter, which I set to AVDISCARD_ALL, but at least 
> for MPEG-2 the decode is not significantly faster.

Could you elaborate?
Skipping idct makes a large difference here for mpeg-2 
decoding.
Perhaps test with the cli (ffmpeg -benchmark -skip_idct) 
and post some output.

> Are there any other good options to use?

You can use "fast" if you know that the input is valid 
(not corrupt) but it does not add much additional 
speedup.

Carl Eugen



More information about the Libav-user mailing list