Community
cancel
Showing results for 
Search instead for 
Did you mean: 
ABake3
Novice
1,522 Views

Gstreamer MP3 plugin

Hey there.

I followed https://software.intel.com/en-us/articles/play-audio-from-your-intel-edison-via-bluetooth-using-adva... this document to get wav files to play using Gstreamer and pulseaudio over bluetooth to a speaker. At the end of the document it says:

"You may run into issues playing .mp3, stay tuned for updates."

 

Has anyone got mp3s to work? I'm currently using the wavparse plugin:

gst-launch-1.0 filesrc location= /home/root/music/sound.wav ! wavparse ! pulsesink

 

I would expect it to be mad for MP3:

gst-launch-1.0 filesrc location= /home/root/music/sound.mp3 ! mad ! pulsesink

 

But if I try that I get an error: "Your GStreamer installation is missing a plug-in."

 

I've got mp3s to play using mpg123 and alsa http://alextgalileo.altervista.org/blog/lets-make-noise-play-audio-edison/ from AlexT's repo and tutorials.

I'm wondering if anyone has the gstreamer plugins sorted

 

Thanks

 

7 Replies
Sergio_A_Intel
Employee
266 Views

Hi,

Does this procedure work for .wav files? One alternative would be to convert the .mp3 files to .wav files.

You can try converting the .mp3 files to a .wav file and check if the command

gst-launch-1.0 filesrc location= /home/root/music/sound.wav ! wavparse ! pulsesink works for you.

Sergio

ABake3
Novice
266 Views

Hi Sergio

Yes, I can play wav files with gstreamer, just not mp3 files.

I could convert the mp3 files to wav files as you suggest, it would allow me to keep going with my project, but in the long term I was intending to have a lot of music stored on the edison to play through a bluetooth speaker, so the MP3 compression would allow me to store more music.

I noticed AlexT has a load of gstreamer plugins in his repo http://repo.opkg.net/edison/repo/core2-32/ http://repo.opkg.net/edison/repo/core2-32/ but I haven't had chance to explore this yet.

Alex

Matthias_H_Intel
Employee
266 Views

as far as I can see AlexT only has the gstreamer "good" plugins and not the "ugly" ones (http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-ugly-plugins/html/ GStreamer Ugly Plugins 1.0 Plugins Reference Manual: GStreamer Ugly Plugins 1.0 Plugins Reference Manual) which would cover mp3.

Check gstreamer manual (http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/manual.pdf http://gstreamer.freedesktop.org/data/doc/gstreamer/head/manual/manual.pdf) on the differences:

  • gstreamer: the core package
  • gst-plugins-base: an essential exemplary set of elements
  • gst-plugins-good: a set of good-quality plug-ins under LGPL
  • gst-plugins-ugly: a set of good-quality plug-ins that might pose distribution problems
  • gst-plugins-bad: a set of plug-ins that need more quality
  • gst-libav: a set of plug-ins that wrap libav for decoding and encoding

so you may check whether you can use a mp3 decoder out of the "ugly" plugins. Alternatively, there is also the Fluendo mp3 gstreamer decoder plugin you may want to check: http://core.fluendo.com/gstreamer/src/gst-fluendo-mp3/ Index of /gstreamer/src/gst-fluendo-mp3

AT9
Honored Contributor II
266 Views

Yeah, I've removed "ugly" ones exactly because of

might pose distribution problems

which is not something I'm interested in dealing with

RAtlu1
New Contributor II
266 Views

Hello Alex

I need the gst-plugins-ugly for h264 encoding. Any way of finding the opkg packages? Would be of great help

Thanking you

Matthias_H_Intel
Employee
266 Views

you could build from sources directly on the target (just takes some time) if you don't have a Yocto build environment set up

AT9
Honored Contributor II
266 Views

Ditto to what @mhahn said. I'm not going to build packages for those, see my previous post.

Reply