Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No decoder available for type 'video/x-h264

I am trying to run one of qt sample apps without any modification. It is called player and it is a multimedia widget demonstration. My system is Ubuntu 16.04 64bit. When I try to play a video, I see the following error in the console:

No decoder available for type 'video/x-h264

Here is the full error after trying two different videos:

Starting /home/aras/Qt5.7.0_Sept2016/Examples/Qt-5.7/multimediawidgets/build-player-Sept2016-Debug/player...
Warning: "No decoder available for type 'video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)3, profile=(string)constrained-baseline, codec_data=(buffer)0142e01eff0100192742e01ea9101405ff2e00d418041adb7a00f480f55ef7c04001000428de09c8, width=(int)640, height=(int)360, framerate=(fraction)2997/125, pixel-aspect-ratio=(fraction)1/1'."
Warning: "No decoder available for type 'video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)3, profile=(string)constrained-baseline, codec_data=(buffer)0142e01eff0100192742e01ea9101405ff2e00d418041adb7a00f480f55ef7c04001000428de09c8, width=(int)640, height=(int)360, framerate=(fraction)2997/125, pixel-aspect-ratio=(fraction)1/1'."
Warning: "No decoder available for type 'video/x-h264, stream-format=(string)avc, pixel-aspect-ratio=(fraction)1/1, width=(int)1280, height=(int)720, framerate=(fraction)601600/10033'."

I have pretty much every package remotely related to gstreamer installed. When I run gst-inspect-1.0 I get a lot of output and the last line is:

Total count: 241 plugins (1 blacklist entry not shown), 1388 features

~$ gst-inspect-1.0 |grep x-h264
typefindfunctions: video/x-h264: h264, x264, 264

:~$ gst-inspect-1.0 avdec_h264
Factory Details:
  Rank                     primary (256)
  Long-name                libav H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 decoder
  Klass                    Codec/Decoder/Video
  Description              libav h264 decoder

So it looks like to me that everything is installed properly. How come the Qt multimedia example does not work out of the box?

like image 428
Aras Avatar asked Sep 21 '16 04:09

Aras


Video Answer


1 Answers

I've fixed it by installing the GStreamer Multimedia Framework ffmpeg Plugin on my build system:

Arch:

sudo pacman -S gst-libav

Debian:

sudo apt install gstreamer1.0-libav ubuntu-restricted-extras
like image 181
Manuel Schmitzberger Avatar answered Sep 19 '22 22:09

Manuel Schmitzberger