Sound Juicer Encode MP3s

Hi,

just wanted to share some experiences with getting “Sound Juicer” to rip CDs into MP3s. I generally use Ogg when ripping CDs but we have a couple of devices (car & radio) that don’t support Ogg. Therefore I needed to rip to MP3.

“Sound Juicer” in Opensuse 13.2 will allow you to select MP3 (MPEG Layer 3 Audio) but it will then popup to say it’s not supported. This is not the the fault of “Sound Juicer”! “Sound Juicer” uses “GStreamer” to encode audio streams. It does Ogg out of the box because “GStreamer” supports encoding in Ogg. Don’t be followed that you can play MP3s. Playing (decoding) and encoding are different processes.

You need to get an MP3 encoder and then get “GStreamer” to use it. Why doesn’'t Opensuse support MP3 out of the box? There are a lot of patent issues surrounding the use of MP3.

My preferred MP3 encoder is “Lame” (http://lame.sourceforge.net/) because it’s good enough for what I want and I’ve used it for years. You’ll need to download it, compile it and install it. It’ll want to install in system areas so you need to do:

sudo make install

This is important as a later stage will examine these areas to detect if “Lame” is installed. There are ways round this but that isn’t what I did so I’m not going to describe them.

You should now have files like:

16516176    4 drwxr-xr-x   2 root     root         4096 Jul 13 14:03 /usr/local/include/lame
16519223   48 -rw-r--r--   1 root     root        48851 Jul 13 14:03 /usr/local/include/lame/lame.h
16129640   28 -rw-r--r--   1 root     root        27762 Jul 13 14:03 /usr/local/share/man/man1/lame.1
16254112    4 drwxr-xr-x   3 root     root         4096 May  6  2014 /usr/local/share/doc/lame
16129638  480 -rwxr-xr-x   1 root     root       487810 Jul 13 14:03 /usr/local/bin/lame
16129639  564 -rw-r--r--   1 root     root       576298 Jul 13 14:03 /usr/local/lib64/libmp3lame.a
16129636    4 -rwxr-xr-x   1 root     root          945 Jul 13 14:03 /usr/local/lib64/libmp3lame.la
16129603    0 lrwxrwxrwx   1 root     root           19 Jul 13 14:03 /usr/local/lib64/libmp3lame.so.0 -> libmp3lame.so.0.0.0
16129634    0 lrwxrwxrwx   1 root     root           19 Jul 13 14:03 /usr/local/lib64/libmp3lame.so -> libmp3lame.so.0.0.0
16128591  420 -rwxr-xr-x   1 root     root       426583 Jul 13 14:03 /usr/local/lib64/libmp3lame.so.0.0.0

Congratulations! That was the easy bit. The trickier part is getting “GStreamer” to use it.

Some things about “GStreamer” you need to know before you begin. There are two versions of “GStreamer” in use: current version 1.0; legacy version 0.10. You’ll find packages for both in the Opensuse repository and you have both installed (not a problem). The legacy version packages have “0_10” in their package names. “Sound Juicer” (in Opensuse 13.2) uses current version 1.0. “GStreamer” uses plugins to connect up to different packages. The plugins are in three different packages: good; bad (could be written better); ugly (patent issues). The plugin to connect “GStreamer” (1.0) to “Lame” should live in the package “gstreamer-plugins-ugly”, but in “Opensuse” it doesn’t. This is because when it was compiled up for the distribution, lame wasn’t installed.

What I did was to pull down the source code for the “gstreamer-plugins-ugly” package and compile it up myself. Before doing this you need to make sure you have the development packages for “GStreamer” to allow you to compile up the plugins. Check you have the following packages installed:

gstreamer-devel
gstreamer-plugins-base-devel
orc

Get the source code for the package “gstreamer-plugins-ugly”. I took this from the “GStreamer” website: http://gstreamer.freedesktop.org/modules/. Download it (I used version 1.4.5) and compile it e.g.


justin@linux-j0rd:~/Software/gst-plugins-ugly-1.4.5> ./configure
configure: loading site script /usr/share/site/x86_64-unknown-linux-gnu
...
configure: *** Plug-ins without external dependencies that will be built:
    asfdemux
    dvdlpcmdec
    dvdsub
    realmedia
    xingmux

configure: *** Plug-ins without external dependencies that will NOT be built:

configure: *** Plug-ins that have NOT been ported:

configure: *** Plug-ins with dependencies that will be built:
    lame
    x264

configure: *** Plug-ins with dependencies that will NOT be built:
    a52dec
    amrnb
    amrwbdec
    cdio
    dvdreadsrc
    mad
    mpeg2dec
    sid
    twolame

configure: *** Orc acceleration enabled.

justin@linux-j0rd:~/Software/gst-plugins-ugly-1.4.5> make
...
justin@linux-j0rd:~/Software/gst-plugins-ugly-1.4.5> ls ext/lame/.libs/libgstlame.so
ext/lame/.libs/libgstlame.so
justin@linux-j0rd:~/Software/gst-plugins-ugly-1.4.5>

The file “libgstlame.so” is what I’m looking for as it’s the plugin that enables “GStreamer” to use "Lame. To work it needs to be in the location:

/usr/lib64/gstreamer-1.0/libgstlame.so

What I should have done is create my own copy of the package and installed it in preference to the one from the repository, but I didn’t :-(. Instead I just copied the file “libgstlame.so” into

/usr/lib64/gstreamer-1.0

. Next time I started “Sound Juicer” it picked it up and I’ve been happily ripping to MP3 since.

There’s a lot here and it reflects what I would have liked to know beforehand. Probably someone is going to come along and point out a much easier way of doing it, please do. I did hunt around on google but I couldn’t find what I needed to know.

J.

Why not just install gstreamer-plugins-ugly and gstreamer-plugins-ugly-orig-addon from Packman? :wink:
The latter one contains the plugins missing from the openSUSE package, including libgstlame.so…

Lame is available in the Packman repository and so are the GStreamer integration files.

You should never manually install lame due to conflicting versions in the future and it would require you to update it manually everytime fixes are released.

Cheers guys - now I know.

J.