Sunday, September 28, 2008

Linux Task: Rip an mp3 from a CD.

Results: Failed! Then Succeeded!

Okay, so here's the report on the last few (highly frustrating) hours.

Sounds like a simple task, make an mp3 from a CD. Windows comes with this functionality built into Windows Media Player, you don't even have to connect to the internet. With Linux, it's a different story. Turns out that MP3 isn't a “freely” available format. Most of the software that comes in the box (so to speak) with Fedora will pretty much only make .ogg or .flac audio files.

As a novice Fedora and Linux user, I had a rather steep learning curve in front of me.

First, I did the obvious – fired up Sound Juicer which comes bundled with Fedora 9. That even came with a handy little “Rip it now” button. Sounds good, right? What should have been an easy one-click operation turned into a six hour saga.

I won't bore you with the details, but if you found this through a Google search I'll be nice to you and jump straight into the answers on how to get MP3's from audio cd's in Fedora 9 (or most Linux distro's).

First, you will need to get Lame (or another mp3 info-library thingy) onto your computer. If you want to check if you have Lame installed, go to the Terminal and type “whereis lame” (note: it does not matter which folder you are currently in or which user you are logged in as). If you get “Lame:” and nothing else then that means that you don't have lame installed.

To install lame: simply Google “Fedora +lame +install” and you should find a couple of pages that tell you how to go about installing lame. I didn't link directly to one because several of the tutorials that I found pointed to pages that were no longer available. It seems that Lame tends to move around a lot.

Once you get Lame installed, run the whereis command again and you should get something that looks like /usr/bin/lame – remember this bit of information.

(Quick note – I tried several different methods of ripping in Linux. The most recommended programs were Sound Juicer {comes with Fedora 9}, abcde {A Better CD Extractor} and Grip. I ended up with all three installed but wound up liking Grip the best. To install Grip on Fedora 9 either type “yum install grip” in the Terminal or go System > Administration > Add/Remove Programs and run a search for Grip. The second option is the one I did.)

Okay, Sound Juicer was a little hard to configure, so I went with Grip. This didn't work for me at first, but once Lame was installed, it was a breeze after that.

With Grip running, I tried to rip and encode but it wouldn't let me (or it wanted to do it as an ogg file). In Grip, I went Config > Encode > Encoder. In the box marked “Encoder Executable” I put in the path from the whereis lookup for Lame (/usr/bin/lame).

I left all the other options as default and guess what – it worked!

Or so I thought.

I put in an a disc from an Australian band and the track information was incorrect – it gave me some American group. But it gave me the right information in Sound Juicer! What to do? A quick search on the net turned up that Grip uses which is somewhat limited but Sound Juicer uses the better Music Brainz. So in Config > DiscDb > Primary server I put in “” and the correct track information came up! (Note: I needed to click the “Initiate DB lookup” button on the bottom for it to refresh with the correct data.)

So now I had correctly named MP3 files sitting on my computer. Success!

But no! There was one more problem: Fedora 9 won't play MP3 files natively. When I tried to play the mp3 files, the built-in player had a whinge and said “we don't support non-free formats”!

However, there was a little button underneath that said “Show me options”. Clicking that brought up a few places that provided mp3 support for Linux. A small download later and finally! MP3 files playing on my computer.

If I'd known it was going to be this hard, I wouldn't have bothered going over to Linux.

Okay, I lie, I still would have. But it'd be nice if there was a “Linux Noobs start here” with a list of common tasks (ex)Windows users might want to do and how to do them...

1 comment:

Rob Edwards said...

A good resource is -