video - ffmpeg decode example using vda acceleration? -
i'm testing vda hw accelerated decoder of ffmpeg, have no luck far.
the command line use this:
./ffmpeg -hwaccel vda -i ~/downloads/big_buck_bunny_720p_surround.avi -c:v rawvideo -pix_fmt yuv420p out.yuv
(the input video can downloaded here: http://mirrorblender.top-ix.org/peach/bigbuckbunny_movies/big_buck_bunny_720p_surround.avi)
but uses sw decoder, instead of requested vda hw decoder.
i debugged ffmpeg.c, , found out in function get_format:
if (!(desc->flags & av_pix_fmt_flag_hwaccel)) break;
the desc->flag isn't set av_pix_fmt_flag_hwaccel, skips hw acceleration initialization.
the reason because pix_fmt set av_pix_fmt_none reason, instead of yuv420p specified command.
i changed command this:
./ffmpeg -hwaccel vda -i ~/downloads/big_buck_bunny_720p_surround.avi -c:v rawvideo -pix_fmt vda_vld out.yuv
but got was:
impossible convert between formats supported filter 'format' , filter 'auto-inserted scaler 0' error opening filters!
can please show me example of using ffmpeg dump above video yuv using vda hw decoder?
update ffmpeg mailist.
i told try following command instead:
./ffmpeg -vcodec h264_vda -i ~/downloads/big_buck_bunny_720p_surround.avi out.yuv
but got:
./ffmpeg -vcodec h264_vda -i ~/downloads/big_buck_bunny_720p_surround.avi out.yuv ffmpeg version 2.6.1 copyright (c) 2000-2015 ffmpeg developers built apple llvm version 6.0 (clang-600.0.57) (based on llvm 3.5svn) configuration: libavutil 54. 20.100 / 54. 20.100 libavcodec 56. 26.100 / 56. 26.100 libavformat 56. 25.101 / 56. 25.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 11.102 / 5. 11.102 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 1.100 / 1. 1.100 [10:20:50.169] vtdecompressionductcreate signalled err=-8973 (err) (could not select , open decoder instance) @ /sourcecache/coremedia_frameworks/coremedia-1562.107/sources/videotoolbox/vtdecompressionsession.c line 1181 [h264_vda @ 0x7f9feb034600] failed init vda decoder: -12473. [avi @ 0x7f9feb00da00] failed open codec in av_find_stream_info [null @ 0x7f9feb034600] missing picture in access unit size 9960 [10:20:50.252] vtdecompressionductcreate signalled err=-8973 (err) (could not select , open decoder instance) @ /sourcecache/coremedia_frameworks/coremedia-1562.107/sources/videotoolbox/vtdecompressionsession.c line 1181 [h264_vda @ 0x7f9feb034600] failed init vda decoder: -12473. [null @ 0x7f9feb034600] missing picture in access unit size 457
the reason wanted try because wanted use vda libavcodec in first place. problem saw above. looks ffmpeg has same issue.
i cold emailed author of libavcodec/vda_h264_dec.c
replied following message:
i'm not surprised vda decoder cannot inited here. guess have remux video use mp4 or mkv container.
i don't know happens there, according experience playing vda framework before, framework had quite few limitations. guess limitation met might that, required data of video init decoder, made support of containers. forget exact name of data, afaik, mp4-compatible container provide that.
i remember mp4 has extradata field, don't know is.
i tried following command, worked:
./ffmpeg -hwaccel vda -i ~/downloads/big_buck_bunny.mp4 -c:v rawvideo -pix_fmt yuv420p out.yuv
Comments
Post a Comment