Ripping Copy-Protected Tracks

If you've got Dido's rather good album "Life For Rent", you may be annoyed to discover that it won't play from your PC CD-ROM drive. The disc includes a program to play it securely on Windows, but that doesn't help us Linux or Mac schmucks. But fear not!

This page describes how to extract the tracks from a copy-protected disc. It presumes that you have a copy of the cdparanoia program to hand (ideally, built from source), and that you've checked that you can use it to extract tracks from regular CDs.

Quick reference:
Note well
General approach
Data tracks
Comments by Jan
Frequently asked questions

Note Well

Enjoy the music! You might like to email the artist / music company and tell them that you've managed to play the music despite the damage they did to the disc. But if they keep making it awkward to play the music, they ought to consider how much more likely people are to give up buying the disc and just download it.

And rip, don't rip off, the album. There's no reason to fuel the music industry paranoia about playing music on PCs. Use the ripped tracks only for your own reasonable personal use, as per the existing (and perfectly adequate) copyright laws.

General Approach

This works for:

To extract tracks 1-10 from a protected music disc in your main CD ROM drive:

cdparanoia -d /dev/cdrom -Y -v --output-wav --batch --force-read-speed 1 1-10

This dumps the tracks in the current directory in WAV file format under the names track01.cdda.wav etc. It forces the CD ROM drive to read at single speed, hopefully reducing the number of retries that the software will make in reading tracks with copy-protect noise. It also instructs (with the -Y flag) the program to ignore normal errors as far as possible. Obviously, if your protected disc is also scratched then you're fairly screwed. :-)

If you're using a different CD ROM drive then change the argument to -d appropriately; for my SCSI CD ROM drive I use -d /dev/scd0 for example.

Play each track in turn with:

 play track01.cdda.wav
to ensure that it's free of artefacts.

Now you can record a CD-R with these tracks, essentially producing a duplicate of the original disc but without the corrupting noise; ironically, you have produced a proper CD from an incorrectly formatted disc. Insert a blank CD-R into your CD recorder drive (assumed to be a SCSI drive with ID 3) and type:

cdrecord -v speed=2 dev=0,3,0 -audio -pad track*.wav??

This command records at 2x speed; you can adjust this to 4x speed or greater if your CD writer supports it. You need to change the 0,3,0 to 0,X,0 where X is the SCSI ID of your CD writer.

This should produce an audio CD that will play in any CD-ROM drive, computer-based or otherwise. You can then rip from the CD in your own time with your usual software.

Data Tracks

This is needed for:

You may find that track 1, despite being an audio track, is marked as data. cdparanoia won't rip this track. You can force it to do so, but you need to modify the source - download and extract the source from xiph.org first.

In file main.c change the following lines:

1012: report("Selected span contains non audio tracks.  Aborting.\n\n");
1013           exit(1);

to:

1012: report("Warning: selected span contains non audio tracks.\n\n");
1013           /*exit(1)*/;

Re-make and re-install the program. Now re-run your normal cdparanoia command line, instructing it to retrieve all the tracks you want including the audio track. It will still warn you that you're extracting a digital track, but it should extract it without any problems.

Comments by Jan

Jan Brunner writes:

I recently tried to rip CDs in Linux for the first time and found out that the results are not convincing at all with some badly scratched CDs one can buy in the stores these days. I then found your site and used your patch for cdparanoia to read the audio tracks that were somehow marked as data tracks by the scratches...

Then I found an even more scratched CD that managed to have a wrong TOC: lots of 10 seconds tracks and several tracks combined in one, depending on when I inserted the CD. I was of course not satisfied and searched for further methods.

I then found an interesting post to the German Suse mailing list:

The interesting part is this command (all in one line):
cdrecord -setdropts -force driveropts=singlesession dev=/dev/cdroms/cdrom1

The program seems to complain because I specified the device by the device name but it worked and I don't know how to do it otherwise. It forces the drive to ignore all sessions but the first and strangely, the bad TOC scratches seem to only be in the later sessions on all CDs I tried... ;)

This trick only works with CD writers as far as I know. Normal readers don't have the necessary interface.

Perhaps you'd like to try this trick out and post it to your page. I sure hope that the labels will stop releasing these scratched CDs...

Posted as requested -- thanks Jan! Adi

Frequently Asked Questions

Is this legal?
I am not a lawyer. I believe, however, that if you're using the unprotected CD for the same uses as a normal music CD then you are legal under UK law. Of course, if you then try to return/resell the original disc, try to sell or trade copied tracks, then you're in dodgy territory, as you would have been with an unprotected CD.
Is copy-protecting CDs legal?
Probably. However, the protected disc is no longer a proper CD - if you look carefully at the packaging you will notice the lack of the normal "compact Disc digital audio" logo. Therefore if a music store has sold you this disc as a "CD" then they're technically guilty of false advertising. The packet should have a clearly visible label telling you that the disc may not play in computer CD-ROM drives and certain other devices such as jog-proof CD Walkmans.
Is copy-protecting CDs moral?
Maybe. But it's stupid. The stated aim of this protection is to prevent users ripping tracks. However, since you can't play the CD itself in anything other than a Windows PC, and even then you need to install a badly-written player/DRM program, users are going to be more likely to rip the tracks - either with techniques like those above, or by going onto Kazaa/Limewire etc. and downloading tracks others have ripped. If more artists realised this, I would expect them to pressure the record labels not to protect their CDs.
Web pages maintained by Adrian Hilton