HomeBanner

CD Ripping

Inroduction

Keith Winston

Ripping is the process of copying audio data from an audio CD and compressing it into small, but high quality files. There are several competing audio formats right now and I will mention three:

MP3

The most popular format and the first to use ultra high compression and quality making music files practical. It is patented and music distributors don't like it because it contains no controls to restrict your ability to play to trade files. Of course, these are things that helped make MP3 popular in the first place. An MP3-Pro format is also available with better quality and compression, but I have not tried it.

OGG

Ogg-Vorbis is a patent free open source audio format with similar quality and compression to MP3. The codecs are well supported in Linux and Windows media players. Since the final release of the Ogg-Vorbis 1.0 spec, I prefer Ogg, but have been reluctant to make it my default audio format until the are some portable music players that support it.

WMA

The Microsoft Windows Media format. It is a high quality format that has even better compression than MP3 or OGG. However, it is closed source, patented, has copy controls, and is poorly supported, if at all, on Linux.

Requirements

  • cdparanoia release 9.8

  • oggenc version 0.8 (libvorbis rc2)

  • lame version 3.70

  • mpg123 version 0.59s-mh4

  • grip 2.96 (optional)

Let's Rip

Ripping music from a CD is normally a two-step process. Copy the raw data (as a .wav) from the CD to disk. Encode the .wav into either an .mp3 or .ogg.

It can all be done easily in one step, but I want to review how to do it manually first.

Copying data from a CD to .wav format is done with the cdparanoia program. In addition to simple reading, cdparanoia adds extra robust data verification, synchronization, error handling and scratch reconstruction capability.

It defaults to using the /dev/cdrom link unless you tell it to look for other CD-ROM devices.

This rips tracks 1-4 from a CD into separate .wav files in the current directory:

cdparanoia "1-4"
      

You can do some wild things with cdparanoia like ripping only part of a track. See the man/info pages.

Once tracks have been copied, you need to encode them using either the OGG encode (oggenc) or MP3 encoder (lame). The oggenc program is included in most distros. The lame MP3 encoder can't be included with most distros since it is patented.

You can however, download the latest source code from http://www.sulaco.org/mp3 ,you then have to compile the source to get the lame executable.

To encode to an OGG file at 128 kb/s (produces input.ogg):

oggenc -b 128 input.wav
      

To encode to an MP3 file at 128 kb/s (high psycho-acoustics):

lame -h input.wav input.mp3
      

Don't forget to delete the .wav files if you don't need them anymore.

Configuring Grip

The very best ripper I've tried so far is a GTK program called grip. Grip combines a CD player, CDDB reader, ripper and encoder in one nice interface.

Grip calls and/or embeds several programs, including gcd and cdparanoia, oggenc, and lame.

There are few things to set up before you start using grip.

  1. First, if you want to rip as a regular user and not be limited to ripping as root, you need to loosen the permissions on a few files used by by grip.

    In you are using a SCSI CD-ROM (even one emulated through ide-scsi), you need to add permissions to the generic SCSI device:

    chmod a+rw /dev/sg0
          

    If you are ripping from an IDE CD-ROM, this is not required.

  2. Second, make these programs SUID:

    chmod u+s /usr/X11R6/bin/gcd
    chmod u+s /usr/X11R6/bin/grip
    	    

    You are now ready to launch grip and set a few GUI options. The GUI design may be a little confusing with nested tabs with the same or similar names, but let's move on.

  3. Go to the Config tab, then Rip tab, then Ripper tab. Here you can select the ripper you want, either the embedded cdparanoia, and external cdparanoia, cdda2wav, or other. I use the embedded cdparanoia.

  4. Next, go to the Config tab, Rip tab, MP3 tab to select the encoder you want to use. I use either lame or oggenc depending on whether I want MP3s or OGGs. Also, fill in the path to your encoder. Then, on the options tab, you can select your desired bit rate and check the option to delete the .wav files after encoding.

There are many more options to explore, but this is all you need to get started.

Ripping with Grip

Finally, to actually rip a CD, load a CD, start grip and it should within a few seconds grab the CDDB information about the tracks on the CD.

  1. If you want to preview any tracks before deciding to rip them, you can listen to the CD from grip.

  2. Next, select the tracks you want to rip by right clicking next to the tracks (a check mark will appear).

  3. Next, go to the Rip tab and click Rip+Encode.

  4. Watch the progress with the status bars at the bottom. Since grip is multitasking, it can rip one tune while encoding another.

  5. Grip stores your tunes by default under ~/mp3/artist/title/ Of course, you can change where it stores ripped files.


Updated: Tue, 03 Feb 2004
Valid CSS!Valid HTML 4.01!