Hardware video decoding using Gstreamer on Ubuntu?

Hi,

Is the v4l2dec element in gstreamer 1.0 supposed to provide hardware-accelerated H.264 decoding? I am using the 15.09 release of Ubuntu, but I don’t see any improvement in CPU utilization compared with software decoding using avdec_h264 when I use v4l2dec, and 1080 playback is very sluggish.

If hardware decoding is indeed supported, could you please suggest a release/snapshot version of Ubuntu that is known to work?

Thanks

hi,

can you provide more information about which tests are you doing?

If i use the following pipeline:

gst-launch-1.0 -v filesrc location=/media/linaro/hdd-data/samples/big_buck_bunny_720p_h264.mov ! qtdemux ! h264parse ! avdec_h264 ! glimagesink

and if I try v4l2dec instead of avdec_h264, I believe I am getting better results.

Also, before running the video I did:

sudo cpufreq-set -g powersave

in order to force all 4 CPUs to run at 200MHz, instead of the default ondemand governor, which would make it difficult to benchmark.

Hi ndec,

Thanks for your comment.

I actually do see some difference in CPU utilization between v4l2dec and avdec_h264.

Here is what I tried:

sudo cpufreq-set -g powersave

gst-launch-1.0 filesrc location=big_buck_bunny_720p_H264_AAC_25fps_3400K.MP4 ! qtdemux ! h264parse ! v4l2dec ! glimagesink

gst-launch-1.0 filesrc location=big_buck_bunny_720p_H264_AAC_25fps_3400K.MP4 ! qtdemux ! h264parse ! avdec_h264 ! glimagesink

With v4l2dec, gst-launch-1.0 is showing about 40% of CPU usage while avdec_h264 shows 60%.

I was expecting more significant CPU off loading. Perhaps there is still some memory copy or something CPU intensive in the pipeline? If so, that might explain the sluggish 1080 playback.

Thanks.

hi,

yes, there are still memcpy that need to be optimized. I agree on that part… the glimagesink element doesn’t seem to support dmabuf yet (or maybe there is a bug there). we are aware that we need to look into that…

Hi ndec,

Thanks. That explains the issue.