[Libav-user] difference between various h264 codec...

Jean-Yves Avenard jyavenard at gmail.com
Sat May 3 15:25:31 CEST 2014


Hi..

Currently updating our vdpau code that was written many moons ago, to
use the newish hwaccel API instead...

Previously, we would specifically use the vdpau equivalent codec.

So for example, say were going to open a h264 video, we would instead
use and open the "h264_vdpau" codec.

Since using the hwaccel_context / hwaccel in AVCodecContext, that
method of searching explicitly the vdpau equivalent codec only works
with mpeg1/2, h264 and vc1 fail... If I explicitly use the h264_vdpau
codec, I get lots of errors.

If I simply open the h264 codec as-is; it works, and I can see I have
a very low CPU usage (eg 5-6% vs 90%). That tells me it all works.

But in the logs, all entries are with [h264] rather than [h264_vdpau],
making it hard to know if I'm using vdpau or not, or if it's not
optimal.

playing the file with mplayer (updated as-of today), the log do
contain [h264_vdpau], so obviously they do something rather
differently.

The main reason I'm asking, is that I'm not 100% sure vdpau is properly used.

With high-complexity codec like h264 or vc1 it's easy to see if it's
using vdpau: just look at the CPU usage, the difference being
significant enough.

But with things like old wmp3 or mpeg, you can't really tell the
difference on a modern CPU.

As I'm trying to prevent any regressions, I wanted to be sure.

Is it okay to simply open the codec found by default in my stream
as-is, and FFmpeg will see automatically that hwaccel is set and do
what needs to be done?

thanks.


More information about the Libav-user mailing list