Thursday, 11 September 2008

It lives!

Really exciting mp3 encoder that is!
I have been trying to get Rhythmbox to rip CDs to mp3 for use in the car for a good few hours sans-fortune.

After numerous attempts to manage audio profiles through the gnome interface, everytime I try to encode to mp3 all I would get was .flac files. Could encode to Ogg fine, but doubt that would work with the portable devices Iwant the music for.

With some help from these guys:
http://www.fedoraforum.org/forum/showthread.php?t=198761
I got to understand what should be happening... rythmbox uses gnome audio profiles to encode audio, those audio profiles refer to software on the machine to do the encoding.

In order to encode mp3 I needed to get hold of a library or two for gstreamer and make sure Lame was installed. I still couldn't persuade the system to play nicely for me.

I now had two sets of profiles, one under the /etc tree and one under the ~/ tree. Which does what? I assume the user profiles would override those define in the system tree.

Ultimately that is correct, though only proven once I followed some instructions here:
http://ubuntuforums.org/showthread.php?t=329106

That is now stored as a shell script in case it all goes south again!

Thanks due to this guy.
http://xxxdan.com/weblog/



Stuff that worked for me:
mkdir ~/.gconf/system/gstreamer/0.10/audio/profiles/MP3@32@128Kb
gconftool-2 -t bool --set /system/gstreamer/0.10/audio/profiles/MP3@32@128Kb/active 1
gconftool-2 -t str --set /system/gstreamer/0.10/audio/profiles/MP3@32@128Kb/description "Encodes at 128Kb (variable bitrate) via LAME MP3 encoder"
gconftool-2 -t str --set /system/gstreamer/0.10/audio/profiles/MP3@32@128Kb/extension "mp3"
gconftool-2 -t str --set /system/gstreamer/0.10/audio/profiles/MP3@32@128Kb/name "LAME MP3 128Kb"
gconftool-2 -t str --set /system/gstreamer/0.10/audio/profiles/MP3@32@128Kb/pipeline "audio/x-raw-int,rate=44100,channels=2 ! lame name=enc vbr=0 bitrate=128"
mkdir ~/.gconf/system/gstreamer/0.10/audio/profiles/MP3@32@192Kb
gconftool-2 -t bool --set /system/gstreamer/0.10/audio/profiles/MP3@32@192Kb/active 1
gconftool-2 -t str --set /system/gstreamer/0.10/audio/profiles/MP3@32@192Kb/description "Encodes at 192Kb (variable bitrate) via LAME MP3 encoder"
gconftool-2 -t str --set /system/gstreamer/0.10/audio/profiles/MP3@32@192Kb/extension "mp3"
gconftool-2 -t str --set /system/gstreamer/0.10/audio/profiles/MP3@32@192Kb/name "LAME MP3 192Kb"
gconftool-2 -t str --set /system/gstreamer/0.10/audio/profiles/MP3@32@192Kb/pipeline "audio/x-raw-int,rate=44100,channels=2 ! lame name=enc vbr=0 bitrate=192"
gconftool-2 -t list --list-type string --set /system/gstreamer/0.10/audio/global/profile_list "[MP3@32@192Kb,MP3@32@128Kb,voicelossy,voicelossless,cdlossy,cdlossless]"
Post a Comment