Get a Grip on CD Ripping






Get a Grip on CD Ripping

Use the Grip program to automate ripping audio CDs into music files.

The command line is definitely a powerful tool, particularly for automation, but it can also make doing a task like ripping a CD more trouble than it's worth, especially if you plan on tagging the resulting audio with metadata such as ID3 tags. While there are several frontends for command-line tools, Grip, in our opinion, is an excellent example of a GUI frontend that balances the power and configurability of the command line with the ease of use of a GUI interface. After you get to the end of this hack, your CD-ripping process will be so automated that once you start, you won't even have to pick up a mouse.

Install Grip

It is simple to install Grip: just install the grip package using your preferred package manager. Grip is a frontend in that, for the most part, it uses other command-line utilities behind the scenes to do all of the work and simply provides an easy-to-use interface to configure the commands it passes down to those tools. Because it is a frontend, Grip can make use of many different command-line CD-ripping and audio-encoding programs, and, as such, it supports ripping to a number of popular formats including MP3, Ogg Vorbis, FLAC, or even a custom encoder of your choosing. This also means that to take advantage of those tools, you will need to already have them installed, but Ubuntu's package manager will take care of the major dependencies.

Configure Ubuntu to Default to Grip

By default, Ubuntu uses a program called Sound Juicer to play audio CDs. This program is fine but lacks a lot of the configurability and power of Grip.

You could manually launch Grip each time you want to use it, but you can make Ubuntu launch it for you whenever it detects that an audio CD has been inserted. To do so, click SystemRemovable Drives and Media to open the "Removable Drives and Media Preferences" window. Then, where it says Command under Audio CD Discs (on the Multimedia tab), replace sound-juicer (and its arguments, if any) with grip.

You may have to log out of and back in to GNOME for this change to take effect.

Configure Grip

Before you rip your first CD, you need to configure Grip. First, launch Grip from ApplicationsGrip. Grip's main interface is broken into a number of tabs:


Tracks

This tab displays the current list of tracks for a CD that has been inserted into the CD player and allows you to check which of the tracks you want to rip. Grip also functions as a CD player, so you can select a particular track from this tab and click the play button at the bottom of the window to play the track.


Rip

Here, you can see the current progress of any ripping and encoding you have scheduled and start or abort the ripping process.


Config

Under Config, you will find a number of subtabs that configure how Grip rips and encodes a CD.


Status

Look here for constantly updated text output for any jobs that have been done. You can look here to see any error messages or other output.


Help

This tab provides buttons to launch help for different categories, including how to play CDs, rip CDs, and configure Grip.


About

Here, you'll find information about Grip itself, including the version and a link to the official web site.

To configure Grip, click the Config tab to reveal a number of subtabs that configure different Grip settings. The tabs you are interested in are CD, Rip, Encode, ID3, and DiscDB.

Configure CD options

The first tab, CD, lets you configure your CD device. For the most part, the default settings will work, but for the purposes of automated ripping, make sure that the "Auto-play on disc insert" option is off. To test whether Grip has the correct CD-ROM device, insert an audio CD and see whether Grip sees and can play it. If not, make sure /dev/cdrom is pointing to your correct CD-ROM device, often /dev/hdc or /dev/scd0.

Configure ripping options

The Rip configuration tab is where things start to get interesting. Because so many people are used to automated programs that turn their CDs into MP3s, they often don't realize that ripping is a two-stage process: first ripping the tracks from the CD into WAV files, and then encoding the tracks to MP3, Ogg, or whatever other format you wish. This tab controls the ripping stage of the process, and most of the options are pretty self-explanatory.

The first subtab, Ripper, lets you configure which CD-ripping program to use. Grip now includes its own version of cdparanoia by default, and we recommend that you use it unless you have a good reason not to. cdparanoia by default rips more slowly than most other ripping programs (on most of our CD-ROM drives, it rips at 2x), but what it loses in speed, it more than makes up for in accuracy. cdparanoia is slow because it is particularly thorough about getting every bit it can from the CD. If you rip with faster but less thorough ripping programs, you may notice pops or gaps in your tracks. Even on many of our scratched-up CDs, cdparanoia has been able to recover the track.

Once you choose your CD-ripping program, you can configure it further in the Ripper tab. In the case of cdparanoia, you can disable a number of its default options, including what it calls "paranoia" and "extra paranoia"how thorough it is about reading the CD. We recommend you leave these and the scratch-detection and repair options alone. The primary option in this subtab you should be interested in configuring is the "Rip file format" option. Here, you can tell Grip where to put and how to name the WAV files it rips. Grip uses a number of variables that correspond to metadata from the CD. Figure lists a number of the common variables and what they represent.

Table Grip naming variables
Variable What it represents
%A The artist name for the disc
%a The artist name for the track (useful for multiartist CDs)
%y The year of the disc
%d The name of the disc
%t The track number, zero-filled so that 3 would be shown as 03
%n The name of the track
%x The encoded file extension (mp3 for MP3 files, ogg for OGG files, and wav for WAV files)


For example, if you stored your MP3s in a directory called mp3 in your home directory, you might put in the "Rip file format" field:

~/mp3/%A/%y-%d/%t-%n.%x

Decoded, that line would turn Track 10 of the London Calling CD by The Clash, called "The Guns of Brixton," into the file ~/mp3/the_clash/1979-london_calling/10-the_guns_of_brixton.wav.

You can use whatever naming scheme you wish for your audio files. We prefer this method because it organizes all our CDs by artist, then by each album sorted by date, then by each track. This way, no matter what audio player we use, by default the tracks are all in order.


With this subtab configured, click the Options subtab to get to other ripping options. There are a few options here that we like to enable, particularly "Auto-rip on insert" and "Auto-eject after rip." With these options enabled, when Grip is running it will automatically start ripping a CD for you when you insert it and then eject it when it's done. This means that once the rest of Grip is configured, you can set up a stack of CDs at your desk, start Grip, insert the first CD, and then minimize it and do something else. When you see that the CD has ejected, you can just replace it with another CD to rip and go on with what you were doing. Grip will handle the rest. It doesn't get much more automated than that!

Configure encoding options

The next main configuration tab is Encode. This tab lets you configure what kind of audio files Grip will encode the WAV files into. The first option, Encoder, lets you choose what encoding program to use. What you choose here depends heavily on what encoding programs you have installed and what kind of audio files you want. For instance, if you want to make MP3s, you will likely choose LAME, mp3encode, or your favorite MP3 encoder. We usually stick with LAME because it is fast and produces decent-quality MP3s. If you want to create Ogg Vorbis files, choose "oggenc." If you want to create FLAC files (a lossless audio codec so there is no degradation in quality), choose "flac." After you have chosen the encoder to use, make sure the encoder executable path points to the location of your encoder (the default should be fine here). The defaults for the next two options, the encoder command line and file extension, should be fine unless you choose to use a special encoder not directly supported by Grip. The next field, "Encode file format," takes the same type of information as the "Rip file format" field in the Rip tab. In fact, if you make sure to use %x as the file extension, you can likely just directly copy and paste from this.

In the Options subtab for Encode, you can configure some specific options for your encoder. Probably the most important option here is the "Encoding bitrate" option, which determines the bitrate at which to encode your audio file if you use a lossy encoding such as MP3 or Ogg. What you put here is largely a matter of taste, although the higher the number, the larger your resulting file will be. In the case of MP3s, some people can't tell the difference between 128 and 256 kilobits per second. For other people, the distinction is great. We usually use 192 or 256 kilobits per second here, but you may want to experiment with the output for your audio files and determine what bitrate is best for you; your choice may vary depending on the type of music you are encoding. In this tab, you also have the option to create an .m3u playlist file for each CD you rip and choose where to put it. Generally, the only other option we enable in this subtab is "Delete .wav after encoding." (.wav files are quite large, and once Grip has encoded them to MP3 or another format, there's no reason to keep the .wav around.)

Configure ID3 options

The next major configuration tab, ID3, lets you control whether Grip inserts ID3 tags into your audio files. Generally, this is a good thing, and you will want all these options enabled unless you want to go back later and manually set ID3 tagsan often tedious process.

Configure DiscDB options

The final configuration tab you might want to configure is the DiscDB tab. This tab lets you configure the primary and secondary CD database servers that Grip will query when you insert a CD. These servers contain information on many CDs, based on CD signatures. When you insert a CD, Grip will query this database and retrieve artist, disc, and track information for the CD so that it can automatically fill out the ID3 tags and name the files appropriately. We would recommend sticking with the default servers listed here unless you know what you are doing. Make sure that the "Perform disc lookups automatically" option is enabled here.

Rip a CD

Once you have configured Grip, the process to rip a CD is rather simple: just insert the CD into the CD-ROM drive. Grip will automatically scan the CD, retrieve the track information from your CD database servers, select all tracks for ripping, and start the ripping and encoding process. You can click on the Rip tab to monitor the progress of both the ripping and encoding to see how far along in the process you are. If for some reason you want to stop the ripping process, click the "Abort Rip and Encode" button.

If you notice that the track information that Grip retrieved is wrong, or if Grip was unable to retrieve the track information at all, abort the ripping and encoding process and then click the pencil icon at the bottom of the window. This will expand the window and provide a number of fields that you can use to fill out artist, title, genre, track name, and other CD information. Choose different tracks from the Tracks tab to change specific information for that track. Once you have finished your changes, you can click the envelope icon to submit your changes to your configured CD database so that the information is available to the next person who rips the CD. Once the changes have been made, select all of the tracks in the Tracks tab, and then go to the Rip tab and click Rip+Encode to restart the ripping process.


As mentioned before, the nice thing about configuring Grip in this way is that you can let it run virtually unattended and just feed it new CDs until all your CDs are rippedwhich certainly beats typing long commands and editing ID3 tags by hand!



 Python   SQL   Java   php   Perl 
 game development   web development   internet   *nix   graphics   hardware 
 telecommunications   C++ 
 Flash   Active Directory   Windows