Monday, June 09, 2008

GStreamer plugins to decode MP3 files in SXCE 90

Solaris Express no longer provides a GStreamer MP3 decoder plugin, so you'll need to install a 3rd party plugin (or the plugin from an older SXCE release).

Basically, when you plug in your iPod or run Rythmbox and add some mp3 song, you'll get something like:

"The GStreamer plugins to decode "MP3" files cannot be found.

You can download the MP3 decoder plugin for free from Fluendo (you still need to register and use the webshop interface to "buy" it for 0$).
http://www.fluendo.com/resources/fluendo_mp3.php

Select "Fluendo MP3 Decoder".

Read the documentation, and make sure the plugin is set to executable and all dependencies are resolved.

cthulhu% gst-inspect flump3dec

(gst-inspect:7948): GStreamer-WARNING **: Failed to load plugin '/export/home/cmihai/.gstreamer-0.10/plugins/libgstflump3dec.so': ld.so.1: gst-inspect-0.10: fatal: libgcc_s.so.1: open failed: No such file or directory
No such element or plugin 'flump3dec'

cthulhu% ldd ~/.gstreamer-0.10/plugins/libgstflump3dec.so
warning: ldd: /export/home/cmihai/.gstreamer-0.10/plugins/libgstflump3dec.so: is not executable
libgstreamer-0.10.so.0 => /usr/lib/libgstreamer-0.10.so.0

cthulhu% chmod +x ~/.gstreamer-0.10/plugins/libgstflump3dec.so
cthulhu% grep libgcc /var/sadm/install/contents
/usr/sfw/lib/amd64/libgcc_s.so=libgcc_s.so.1 s none SUNWgccruntime

cthulhu% export LD_LIBRARY_PATH=/usr/sfw/lib
cthulhu% gst-inspect flump3dec
Factory Details:
Long name: Fluendo MP3 Decoder (C build)
Class: Codec/Decoder/Audio
Description: Decodes MPEG-1 Layer 1, 2 and 3 streams to raw audio frames
Author(s): Fluendo Support
Rank: primary (256)

cthulhu% rhythmbox

Now you can play MP3 files in Rhythmbox, Totem, etc.

5 comments:

Anonymous said...

In OpenSolaris is cleaner to use the 'crle' utility to change the library path for the whole system.

BTW this is a problem related to gcc. It should be overriding the linking flags to be something like "-L/usr/sfw/lib -Wl,-R/usr/sfw/lib".

There are more issues related to fluendo codecs and the default compiler provided by opensolaris. I have filled some bug reports. Hope they upgrade GCC for the next release.

Thanks for the tip. We plan to make a new update of the fluendo codecs for OpenSolaris with the last optimizations and features fixing these linking-path issue.

Thanks for the tip and sorry for the noise :)

cmihai said...

They should just use Sun Studio to compile packages.

I'll may just drop their binary plugin and see if the source compiles cleanly with Sun Studio :-).

cmihai said...

cthulhu% ldd ./decoder/.libs/libgstflump3dec.so | grep "not found"
cthulhu% ldd ~/.gstreamer-0.10/plugins/libgstflump3dec.so | grep libgcc
libgcc_s.so.1 => (file not found)


Yep, looks like compiling with Sun Studio solves everything :-). And it compiles cleanly too.

Anonymous said...

I'd like to compile the source for the mp3 decoder too and like to know how to get the source.

cmihai said...

You can use Subversion to get the latest version:

svn co https://core.fluendo.com/gstreamer/svn/trunk

Or you can simply download the tarball:
http://core.fluendo.com/gstreamer/src/

Details here:
http://www.fluendo.com/resources/source-plugins.php