Your GStreamer installation is missing a plug-in

Ubuntu 14.04,Qt 5.6.0 Qt Creator 3.6.1,QML中使用Audio { id: playSound0} 播放MP3时,无法播放,console中收到如下错误:

Warning: "No decoder available for type 'audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)2, layer=(int)3, rate=(int)16000, channels=(int)1, parsed=(boolean)true'."

Error: "Your GStreamer installation is missing a plug-in."

安装一下软件包解决:


sudo add-apt-repository ppa:mc3man/gstffmpeg-keep
sudo apt-get update
sudo apt-get install gstreamer0.10-ffmpeg
sudo apt-get install gstreamer0.10-plugins-ugly




备注:

I tried digging a little into this and according to this thread in the Qt forums the issue seems to be that the QtMultimedia module is still using GStreamer 0.10 as a backend - and from that it needs the gstreamer-0.10-ffmpeg plugin which is not available in some distros anymore due to the move to libav.

If you're using a flavour of Ubuntu you can try installing gstreamer-0.10-ffmpeg from Doug McMahon's ppa:

资料来源:http://stackoverflow.com/questions/26099139/how-to-fix-gstreamer-error-in-qt5

https://forum.qt.io/topic/43468/solved-qtmultimedia-media-player-example-can-t-play-any-video-on-ubuntu-14-04

你可能感兴趣的:(Your GStreamer installation is missing a plug-in)