[FFmpeg-user] example to use VDA hw decoder on mac with ffmpeg?

Shi Yan billconan at gmail.com
Tue Mar 17 02:29:02 CET 2015


I'm testing the vda hw accelerated decoder of ffmpeg, but no luck so far.

the command line I use is this:

./ffmpeg -hwaccel vda -i ~/Downloads/big_buck_bunny_720p_surround.avi -c:v
rawvideo -pix_fmt yuv420p out.yuv

(the input video can be downloaded here:

but it uses the sw decoder, instead of the requested vda hw decoder.

I debugged ffmpeg.c, and found out that in the function get_format:

        if (!(desc->flags & AV_PIX_FMT_FLAG_HWACCEL))


the desc->flag isn't set with AV_PIX_FMT_FLAG_HWACCEL, so it skips the hw
acceleration initialization.

the reason is because the pix_fmt is set to AV_PIX_FMT_NONE for some
reason, instead of yuv420p as specified by the command.

I then changed the command to this:

./ffmpeg -hwaccel vda -i ~/Downloads/big_buck_bunny_720p_surround.avi -c:v
rawvideo -pix_fmt vda_vld out.yuv

but what I got was:

Impossible to convert between the formats supported by the filter 'format'
and the filter 'auto-inserted scaler 0'

Error opening filters!

Can you please show me an example of using ffmpeg to dump the above video
into yuv using the vda hw decoder?

Thank you very much!

More information about the ffmpeg-user mailing list