How to fix gstreamer error in Qt5?

I want to create a small mp3 player as a toy project that started with Qt for a graphical interface. When I try to play an mp3 file, I get this error.

Warning: "No decoder available for type 'audio/mpeg, mpegversion=(int)1, mpegaudioversion=(int)1, layer=(int)3, rate=(int)44100, channels=(int)2, parsed=(boolean)true'." Error: "Your GStreamer installation is missing a plug-in." 

I installed gstreamer and it plugins after googling around

 sudo apt-get install gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav 

But I still get the error. How to fix it?

+5
source share
3 answers

I had the same problem. After using the code below, it is fixed.

 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 

Qt Creator 3.4.2 Ubuntu 14.04

+6
source

I tried to delve into this a bit and according to this thread on the Qt forums, the problem seems to be that the QtMultimedia module still uses GStreamer 0.10 as a backend - and from this it needs the gstreamer-0.10-ffmpeg plugin, which is no longer available in some distributions due to the switch to libav.

If you use Ubuntu flavor, you can try installing gstreamer-0.10-ffmpeg on Doug McMahon ppa:

 sudo add-apt-repository ppa:mc3man/gstffmpeg-keep sudo apt-get update sudo apt-get install gstreamer0.10-ffmpeg 
+1
source

In Debian8, QT5.7 I do the following:

 sudo apt-get install gstreamer1.0* sudo apt-get install gstreamer0.10* 

This is not the best way, but it works.

Sincerely.

0
source

Source: https://habr.com/ru/post/1203614/


All Articles