[Libav-user] difference between various h264 codec...
Jean-Yves Avenard
jyavenard at gmail.com
Sat May 3 17:52:35 CEST 2014
Hi
On 4 May 2014 00:21, wm4 <nfxjfg at googlemail.com> wrote:
> There is no h264_vdpau codec anymore (except maybe the old legacy
> implementation that was removed from Libav, but not FFmpeg yet).
> Instead, you're supposed to use the hwaccel feature.
Great !
I've spent hours attempting to change that, because I was concerned I
wasn't doing it the proper way :)
>
> This is the defacto-documentation how to use it:
>
> https://git.videolan.org/?p=ffmpeg.git;a=blob;f=ffmpeg_vdpau.c
seriously? that's the "documentation" :)
>
> The trick is that you open the normal h264 codec, but select a vdpau
> pixelformat when the get_format callback is used.
Originally, I was returning (as part of the old code legacy), the
pixelformat directly related to the codec:
e.g: returning AV_PIX_FMT_VDPAU_H264. But this cause h264 playback to fail.
so I now always return AV_PIX_FMT_VDPAU in my get_format.
Interestingly, when I do like what everyone else appear to be doing, like:
while(*cur != PIX_FMT_NONE)
{
if (*cur == AV_PIX_FMT_VDPAU)
return *cur;
cur++;
}
return avcodec_default_get_format(avctx, fmt);
for WMP3, the PixelFormat received is AV_PIX_FMT_VDPAU_WMP3, but
there's no AV_PIX_FMT_VDPAU in the list that follows. Wrong order in
the pixel format is my guess.
(this is what XBMC essentially does)
>
> I don't know what they're doing currently, but they still could be
> using the "old" API, or emulating it.
hmmm... looking at it, they are definitely using the new API..
> Well, there's nothing magic about the "new" API, it's just the old one
> slightly changed. I still have no idea why it was changed at all.
there must be something different.
I have a few mpeg2 video that do not play with the old API, but do now.
like the one reported here:
https://code.mythtv.org/trac/ticket/11377
thanks again for you help... much appreciated
More information about the Libav-user
mailing list