Lawrence
Lawrence

Reputation: 35

How to fix `WARNING: erroneous pipeline: no element "mad"`

I am running a gstreamer command to play mp3 from terminal with The following command:

gst-launch-1.0 -v filesrc location=/home/user/songs/song.mp3 ! mad ! audioconvert ! audioresample ! autoaudiosink

I am getting the error below and the mp3 is not playing

WARNING: erroneous pipeline: no element "mad"

I have installed gstreamer plugins already with command below:

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

They are installed successfully but the error remains.

Also I have checked whether mad plugin has been blacklisted using gst-inspect-1.0 and its not blacklisted.

I have cleared ~/.cache/gstreamer-1.0/registry.*.bin.

The command below is failing in ubuntu 18.04

gst-launch-1.0 -v filesrc location=/home/user/songs/song.mp3 ! mad ! audioconvert ! audioresample ! autoaudiosink

The command below works but I want to use "mad: but not "decodebin":

gst-launch-1.0 -v filesrc location=/home/user/songs/song.mp3 ! decodebin ! audioconvert ! audioresample ! autoaudiosink

Upvotes: 2

Views: 2993

Answers (1)

Florian Zwoch
Florian Zwoch

Reputation: 7383

From the GStreamer's 1.12 Changelog on plugins removal:

The mad mp1/mp2/mp3 decoder plugin was removed from gst-plugins-ugly, as libmad is GPL licensed, has been unmaintained for a very long time, and there are better alternatives available. Use the mpg123audiodec element from the mpg123 plugin in gst-plugins-ugly instead, or avdec_mp3 from the gst-libav module which wraps the ffmpeg library. We expect that we will be able to move mp3 decoding to gst-plugins-good in the next cycle seeing that most patents around mp3 have expired recently or are about to expire.

Upvotes: 4

Related Questions