GNU/Linux Desktop Survival Guide by Graham Williams |
|||||
Debian Packages: Package[]grip.
Recording an audio CD to your hard disk allows you to listen to your music (which you have presumably purchased in order to listen to) without having to tie up the CD-ROM drive. To do this first extract the tracks from your audio CD (they are WAV files). These will take up to 600MB for each CD, quite a bit of hard disk storage, especially if you have a large CD collection. This is where MP3 and OGG come in. A 600MB audio CD can be encoded as a 50MB OGG file, allowing the storage of the equivalent of 12 WAV CDs in the space of a single DATA CD with OGG.
Debian provides grip to handle this process for you.
Grip is able to obtain information about your CD from the Free CD Database automatically over the web. This information includes the tack details and is displayed under the Tracks tab (see Figure 14.1). You may need to ensure the configuration for the Free CD Database server is set up--see Figure 14.2 for an example configuration. If the CD information is already available locally (because grip or some other CD utility has previously updated the database of disks in /.cddb) then it will be displayed.
|
The process of reading the WAV tracks from an audio CD is called ripping. A popular GNU/Linux ripper is cdparanoia and Grip includes cdparanoia so you do not need to install the package separately. Also supported are the separately installed rippers cdparanoia and cdda2wav. See Figure 14.3 for an example configuration.
The process of converting the WAV encoding to OGG is called encoding and again there are many alternatives. For MP3 encoding supported Debian packages include lame, bladeenc, l3enc, xingmp3enc, mp3encode, and gogo. The lame encoder is a good choice. Once again, see Figure 14.3 for an example configuration.
|
Grip will rip and encode a CD in separate processes allowing the encoding to happen while the next track is being ripped.
Now we are ready to rip and encode an audio CD. Insert your CD into the CD-ROM drive.
The Tracks tab should list the available tracks. If what you get is a list like that in Figure 14.4 then for some reason the information is not available (probably because you are not connected to the internet or the CD is not know to the databases). In this case, enter the information yourself. This is useful because the information is then recorded in the MP3 file as the ID3 tag. This is used by various MP3 players to display track information. To enter the information yourself click on the Toggle disk editor button (the pencil icon along the bottom row of buttons). This will open up an area for you to enter the relevant information (see Figure 14.4). Once you have enetered the information be sure to share it by clicking on the Submit disc info button with the letter icon.
Next select the tracks you wish to encode. Click in the Rip column heading to select all tracks. Go to the Rip tab and click on the Rip+Encode button. Sit back and wait. This process takes quite a while and is quite resource intensive (so your games may be slow while you wait). The progress bars on the Rip tab show how things are going.
For each CD a playlist is created in /mp3 and for each track
two files are created, usually somehwhere in /mp3 as well,
depending on the settings in Figure 14.3. You set
the location of the playlist in the Config tab under MP3 Options
(where you can also tell grip to automatically delete the
temporary WAV files). The playlist is identified as an M3U file. The
example configuration places both the temporary WAV file and the MP3
file in /mp3/%a/%d/%t.%n.wav and
/mp3/%a/%d/%t.%n.mp3 respectively. That is, a folder is
created having the same name as the artist (%a), and a
sub-folder of this having the disc name (%d). Into this
sub-folder all of the tracks are stored with names consisting of track
number (%t) and track name (%n). So, for
example, you might have:
~/mp3/pink_floyd/a_saucerful_of_secrets/04.corporal_clegg.mp3 |
If there are problems accessing the CD make sure /dev/sg0 has the correct permissions:
# ls -l /dev/sg0 crw------- 1 root root 21, 0 Mar 15 2002 sg0 # chgrp cdrom /dev/sg0 changed group of `/dev/sg0' to cdrom # chmod g+rw /dev/sg0 mode of `/dev/sg0' changed to 0660 (rw-rw----) |