// // //
This was originally written mid-1999 as a talk for the Linux Users of Victoria. Since I notice it still gets a fair few hits on my website, I figured I'll try and keep it reasonably up to date. Suggestions and updates are most welcome.
Making your own MP3 generally consists of running a few programs in succession. Fortunately, plenty of Eager Young Space Cadets have written front-ends to all this, saving you from the tyranny of the command-line. Or something.
This is obviously slanted towards the tools I currently use - I haven't been able to try out every tool out there !
If you're really keen, you can do it all yourself, bit by bit. It usually goes like this :
"Rip" the audio track from CD into some sort of quick, uncompressed format, usually WAV. Of course, you could also sample vinyl, radio, tv, or whatever else you like for this stage.
Run an encoder to turn your WAV file into an MP3.
(optionally) Add an ID3 tag to the MP3 file, which is 128 bits of data containing various info about the file - the track name, artist, album it's from, genre, etc.
(optionally) If you're really keen, there's a few programs that will take the information put in the ID3 tag of your MP3 file and chuck it in an SQL database so you can do things like writing an MP3 Jukebox that lets you search for songs you want to listen to, etc.
Eventually, you'll want to actually listen to the MP3 file you just created...
Most of these programs make use of the CDDB (or the more politically correct FreeDB) in order to try and guess the track names of the CD you're about to rip. They usually just run all of the command-line tools for you with all the correct parameters.
Grip is what I currently use - it's very pretty (without going overboard), is quite compact, and can also just play your CDs too. These days, it links with the cdparanoia library rather than running the cdparanoia command-line program, and it also does the ID3 tagging by itself.
The same author has written another product, DigitalDJ, mentioned in the jukeboxes section below.
Last year, I fiddled about a little bit with ripperX, which is fairly pretty, but I've since abandoned it for Grip.
I haven't tried any of these yet. The links came from the BladeEnc page, but there are others mentioned at freshmeat.
There are two commonly-used programs here, one based on the other.
cdda2wav is still used here and there, but it seems to have lost its crown to cdparanoia (see below).
cdparanoia is the current cd audio extractor of choice. It tries to do as much as it can to correct for drive misalignment, frame jitter and other nasties that can happen with cheap or old CDROM drives. It comes as a library (with a command-line front-end), so you can embed it in your own programs (Grip does this, for instance).
The 8hz encoder was started as an open-source encoder, at least until Fraunhofer noticed (the page is still there as something of a legacy...).
BladeEnc was, for a long time, only available as an executable, but the source has recently been released. Its speed doesn't currently compare too favourably with lame or xing's encoder, though.
lame is a set of patches against the ISO demonstration MP3 encoder source. It's faster than BladeEnc, but unfortunately Xing still beats it (circa 1999). In more recent years though, I've noticed it generates mp3s with much better sound quality than say, old things I'd encoded with Xing. If you're a real sound quality nerd, you might want to read this.
If you're after raw speed at the cost of some quality, you might want to try GOGO, which has heaps of MMX, 3DNow! and SSE optimizations if you have the right kind of CPU. It's based on an old version of Lame, and so misses out on some of the sound quality improvements they've made more recently (March 2002 note : I'm not sure how true this still is. They say they're based on LAME 3.9x at the moment, which doesn't seem as bad, but I'm happy with LAME right now).
Xing. who have encoders (and front-ends) for Windows and Macs, have ported their encoder (just a command-line one) to Linux. I actually bought it back in early-mid 1999 (it's only US$19.95, which I figured I could afford), and found it to be very fast - about 4 times as fast as BladeEnc, and twice as fast as Lame (at the time). In recent years, however, LAME has shown itself to produce mp3s with much better sound quality.
Fraunhofer have their own encoder that you can buy off them if you so desire. I haven't tried it myself.
Since the MP3 format itself doesn't cater for storing info about the track itself, somebody decided to add 128 bytes of data to the end of the file to store various information like so (as culled from the id3ed source) :
/* Field Length offsets * Tag 3 0-2 * Songname 30 3-32 * Artist 30 33-62 * Album 30 63-92 * Year 4 93-96 * Comment 30 97-126 * or{ * Comment 28 97-124 * zero 1 125 * Tracknum 1 126 * } * Genre 1 127 */
As you can see though, this is slightly limiting, and there's an effort underway in the form of the ID3V2 standard to make all of this better and groovier.
mp3tools is a set of tools for managing MP3s, one of which lets you set the ID3 info. It's Perl-based, with a module for most of the useful bits that you can use for other stuff.
id3ed is a handy little program for changing ID3 info on the command line.
For the Emacs user who thought they had everything, there's the Idiot Jukebox, written by the author of Gnus. It's completely unsupported, but will apparently do everything from ripping CDs to WAV, MP3ing them, playing them and even burning the MP3s onto a CD...
DigitalDJ, written by the author of Grip (see Front-Ends). It relies on an SQL database (currently MySQL) to store the song info (Grip can be told to enter the information as it rips CDs for you). It uses mpg123 (see players below) to play the songs.
The Globecom Jukebox looks pretty but needs half a million auxiliary programs set up for it to work.
mpserv seems rather handy for keeping a collection of mp3's distributed across a few machines, with a server to collect the location of them all, and a client (written in Perl/Gtk, which harms its portability I guess) to ask the server about what songs are available, and to tell it what to play.
Gronk is a fairly good jukebox that doesn't rely on having an SQL database around - you generate a set of static pages every time you add another CD to your collection - it's pretty tightly bound to albums you've ripped though, it's not so useful for random MP3s you've downloaded.
XMMS, previously called X11Amp, is fairly popular due to its ability to use WinAmp "skins" to change the appearance of the program's windows. It's fairly featureful, and can play audio CDs (although it doesn't do CDDB lookups yet), MODs, WAVs, and other things too if you feel like writing a plugin for it.
FreeAmp is another fairly featureful player, with strengths more in its organizational abilities than cool plugins such as you get with XMMS.
mpg123 is a command-line player. There are heaps of gui front-ends to mpg123, its page lists a few if you're interested...
AlsaPlayer was written especially for the new ALSA Linux sound drivers (but does with with the older OSS drivers nowadays), and plays MP3s, WAVs, Audio CDs, etc. You can even do pitch control, which is fun to play with.
eMusic is another all-in-one player designed to look pretty. Last time I looked, it was basically functional, but that was a while ago...
The Ogg Project has been working on Ogg Vorbis, a new patent-free audio compression format that hopes to rival other new proprietary audio formats. They have a free encoder and an XMMS plugin.
You can search Freshmeat.net and find a whole heap of MP3 software to play with.
mp3.com has lots of info about the world of MP3, including lots of free (and legal) music you can download to listen to.
epitonic has lots of free music by lots of interesting bands.
r3mix.net explains sound quality issues when you're dealing with mp3s.
A proposed standard for storing replay gain settings within ID3V2 tags. LAME is beginning to support this, for instance..
What about shoutcast, and such ? Some other time...