Background
In this post, I wrote about ripping CDs and the apparently large number of errors you get when you actually bother to check for them. I actually asked the question "Why don't programs provided on CD fail because they have so many bit errors that the code is defective?". I discussed this with some ex-work colleagues over lunch yesterday, and we reckoned something else must be going on... A bit of research reveals that that is in fact the case!The underlying storage mechanism is the same for CD-DA and CD-ROM (and its derivatives), but essentially, the "file system" is different.
Firstly, all CDs use the same encoding scheme -
The Red Book specifies the physical parameters and properties of the CD, the optical "stylus" parameters, deviations and error rate, modulation system (eight-to-fourteen modulation, EFM) and error correction facility (cross-interleaved Reed–Solomon coding, CIRC), and the eight subcode channels. These parameters are common to all compact discs and used by all logical formats, such as CD-ROM. (wikipedia).
The CIRC encoding system basically wraps lots of extra bits around the data as part of the encoding. It also scatters the logical audio frames around a number of physical frames, so that disk faults can be more easily recovered from, since they will generally degrade recoverably a number of logical frames and not obliterate the one with the error.
The CIRC encoding system basically wraps lots of extra bits around the data as part of the encoding. It also scatters the logical audio frames around a number of physical frames, so that disk faults can be more easily recovered from, since they will generally degrade recoverably a number of logical frames and not obliterate the one with the error.
However, CD-ROM, as opposed to CD Digital Audio, adds in more error checksums and another layer of error correction... because it is assumed that computer data cannot be interpolated like audio data, but must be bit-perfect!!
The structures used to group data on a CD-ROM (the Yellow Book) are also derived from the Red Book. Like audio CDs (CD-DA), a CD-ROM sector contains 2,352 bytes of user data... To structure, address and protect this data, the CD-ROM standard further defines two sector modes, Mode 1 and Mode 2, which describe two different layouts for the data inside a sector.
Both Mode 1 and 2 sectors use the first 16 bytes for header information, but differ in the remaining 2,336 bytes due to the use of error correction bytes. Unlike an audio CD, a CD-ROM cannot rely on error concealment by interpolation; a higher reliability of the retrieved data is required.
- Mode 1, used mostly for digital data, adds a 32-bit cyclic redundancy check (CRC) code for error detection, and a third layer of Reed–Solomon error correction leaving 2,048 bytes per sector available for data.
- Mode 2, which is more appropriate for image or video data (where perfect reliability may be a little bit less important), contains no additional error detection or correction bytes, having therefore 2,336 available data bytes per sector.
Format | ← 2,352 byte sector structure → | |||||||
---|---|---|---|---|---|---|---|---|
CD digital audio: | 2,352 (Digital audio) | |||||||
CD-ROM Mode 1: | 12 (Sync pattern) | 3 (Address) | 1 (Mode, 0x01) | 2,048 (Data) | 4 (Error detection) | 8 (Reserved, zero) | 276 (Error correction) | |
CD-ROM Mode 2: | 12 (Sync pattern) | 3 (Address) | 1 (Mode, 0x02) | 2,336 (Data) |
So I guess CD-DA is more liable to uncorrected errors, because nobody gives a toss about audio errors...
Ripping programs can
- Read a sector multiple times and check they get the same result
- Use the "C2" feature implemented in many drives that allows the drive to report potential errors as guidance to the reading program
but of course, nothing can actually fix the errors if they can't be recovered, even if detected. Boo. Oh well. Off to eBay to source another CD-ROM drive...
New Ripping Software - Perfect Sound, Forever!!
I've spent a lot of time trying to use XLD to rip my copies of Wagner's Ring to disk, and it's been very hard work. I don't know why these are so hard, but there are lots of errors, an they almost never match the AccurateRip database. So I thought I'd try dbpowerasp, the ripper produced by Spoon/Illuminate, the people who own the AccurateRip database.
The software seems to work well in itself, it needs some adjusting in terms of tagging and filenames, but it it is taking an extraordinarily long time to rip the firstdisk. I started ripping last night, it read the first track, then announced it would retry 2000+ errors sectors. Great. I left it running when I went to bed... and when I came down this morning it was onto the 3rd track! It's 15.19, and it's still ripping the 4th, with 2676 frames to retry! The first track took 6.30 hours to rip, with its 2000 duff sectors. What is going on?! Are all my CDs going to be this hard? I reckon I should forget ripping CDs, and just play stuff off Tidal, because I can and life's too short!