Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Yup, the correct signal might not get through if you don't have perfect shielding. And a speck of dust on a CD could theoretically ruin a whole song.

That's why CDs (and cellphones, modems, and countless other digital devices) use channel encoding.[1] That way you don't have to have a perfectly noise-free signal to reconstruct the original information.

I don't know that many specifics of the DVD or Blu-Ray standards, but I'd put money on them using Reed-Solomon or something similar.

[1] http://en.wikipedia.org/wiki/Reed-Solomon_error_correction#D...

(Edit: forgot footnote)



sort by: page size:

I suppose if you use really crappy media and an even worse CD recorder you will have significant signal degradation because of all the bits missing so error correction is kicking in

But it's really a stretch


>audio CDs which I've found don't use checksums or other mechanisms to prevent small defects from mangling the bitstream

Redbook audio CDs does use CIRC error correction, by storing 8 bytes of parity data inside each 33 byte F3 frame. It is not enough to correct all errors though, and Yellowbook data CDs stores extra correction codes on top of it. (276 bytes for each 2352 byte sector).

(and there's also issue below F3 frame level about EFM modulation, whether merging codes are generated properly to keep DSV low enough)

See: https://byuu.net/compact-discs/structure/ https://john-millikin.com/%F0%9F%A4%94/why-i-ripped-the-same... https://john-millikin.com/%F0%9F%A4%94/error-beneath-the-wav...


CDs are not all that vulnerable. If they're either in the case or the machine, they're fine. You can wipe dust off with a lot more vigour than with vinyl.

I've had tape machines that would pull the tape out and scrunch it up. Strands of tape everywhere is more than "minor signal degradation". CDs are not prone to repeated signal degradation or to turning into spaghetti.


CD-ROM doesn't have this problem because it introduced a different error correction mechanism with more overhead.

It's been a while since I've looked at the standards in detail but I believe that involves another layer on top of the layer of error correction that CD-Audio has.


> CDs have significant error correction codes so if it sounds right it IS right.

For data CD formats, yes. For audio CD formats, readers are allowed to interpolate over uncorrectable errors (https://en.wikipedia.org/wiki/C2_error), which would not necessarily result in an abrupt skip or pop.


This seems unlikely. CDs don't have physical sectors. But they do have generous error correction, with cross-interleaved versions of the data combined with parity spread out along the "groove".

The rule of thumb is that error correction can compensate for gaps of up to 2.4mm. So if a hole is smaller a CD should be able to cope.


Audio CDs are still able to play back with significant bit errors (CD players just interpolate over the unreadable parts). It’s different for CD-ROMs and data CD-Rs.

In addition to the other points made, when errors get through even the error correction that CDs have, for the same reason FLAC can compress audio by about 2:1 and MP3s can do even better, waveforms can be repaired or even outright made up for significant fractions of second without being noticed by a human. (Half a second would be noticed, but you can forge, say, 1/16th of a second fairly successfully with some simple algorithms. If you get really unlucky and you miss one of the really important voice transients like the letter T versus V or B versus D, it might be noticed, but otherwise it's really easy to fill in a gap like that.)

DVDs do not have that characteristic. While the streams will be recoverable, they will also be very visibly broken if the visible data gets corrupted, and that's much harder to repair. We are much more sensitive to visual corruption in general, and the way the compression works can make even small errors loom large on the screen. (As the compression gets more sophisticated, this gets more true, which is why DVDs generally just have fairly confined block errors, but modern codec errors can cause significant corruption on the screen, followed by the corruption on the screen "moving" like the video was supposed to.)


CD Reed-Solomon forward error correction did make that pretty rare though. You had to abuse a disc a fair amount to overcome the coding.

Compact discs use something far better (in that context), a combination of two interleaved Reed–Solomon codes called CIRC, which is error-correcting (and not just detecting like a CRC). All digital A/V systems have to implement this in order to read a CD. It's made to be strong against burst errors which is why it can handle scratches on a CD pretty well. Samples can also be interpolated if something's really unreadable.

Even with an error-detecting code, there comes a point where there's too many errors to know if you received a valid code word or if the errors just "canceled each other". If 000 and 111 are your only valid words, it's still possible that a 111 gets turned into a 000 (3 consecutive errors) and there's no way to know about it...


Optical media like CDs and DVDs use a similar interleaving scheme, allowing for large amounts of errors to be corrected; in fact, even during normal operation with what appears to be a completely clean and perfect disc and drive, read errors are always occurring but corrected silently so there is no loss of data:

https://en.wikipedia.org/wiki/Cross-interleaved_Reed%E2%80%9...

https://en.wikipedia.org/wiki/Optical_disc#Surface_error_sca...


> some people buy mats to put onto your CDs before putting the CD in a player

An 80-minute, 700 MB CD-R fits 80 * 60 * 44100 * 2 * 2 / 2^20 ~= 807 MB of audio.

Why is that?

The 100MB difference is not just due to the audio TOC being of smaller size than the ISO9660 or UDF file system metadata. It's also because of differences in error correction. I don't have the spec on hand but I recall from when I was investigating this that CD-ROMs use more bits for error correction than audio CDs. That's why you can fit more audio data than "filesystem data" on a CD-R. Reading (ripping, digitally) an audio CD will likely result in different digital audio files every time, since the error correction is not that good, but good enough, for audio.

I read into this when I was wondering why my CD-DA extracted .wavs came out with a different checksum every time. Vibration is one of the factors that would make the same audio CD, read with the same CD player, produce different digital signals some of the time or even every time.

CD-ROMs however, which store digital data, need better correction - you definately don't want a bitflip in your .exe, while a minor amplitude diff — an uncorrected bitflip in the upper bits of a 16-bit PCM signal — is no biggie.

So… I'm not saying that the people using CD mats are informed (or have tested whether the mat makes a difference, or would even know how to go on about testing this, scientifically), but there's more to it than what I originally thought — which was "it's digital so it's never degraded". I wouldn't have known without checking the md5sum of my .wav, though.


Audio CDs have weaker error correction. An audio player has to stream data off the disc without any retries. When a block of data can't be corrected it's passed along with the knowledge that the corruption is localized and usually not noticeable.

Why bother? If you make a CD drive to go into a computer (and not a stereo cabinet), why bother to have a lossy error correction method, when you must have a lossless one sitting right beside it?

Both can be true. I take the parent commenter to be talking about reading data off of the CD in a way that accounts for the irregularities from inconsistent spinning speeds, (I distinctly recall a friend pulling a CD out of the CD player and placing it back in to resume spinning, while a song was playing without any break in the song). Perhaps, additionally, the was some degree of accounting for resilience to things like blemishes and fingerprints.

It can nevertheless be true that the CDs were failing all the time. So robust error correction is real to achieve the degree of functionality that we did enjoy during the heyday of CDs, and despite this, the fragility of CDs as an information medium meant that they were still disappointing us.


Audio CDs can survive a bit of degradation to the odd data bits here or there; the music will just skip the millisecond of missing data and your ears won’t notice. Likewise with vinyl. Data discs on the other hand have the issue that if a single data bit is lost, a whole file could be corrupted, especially if it’s a zipped file.

In addition, printed audio CDs are of a different build than CD-Rs which have been found to not be as resistant to moisture and light.


A lot of CDs aren't in perfect condition, either because of scratches or things like https://en.m.wikipedia.org/wiki/Compact_disc_bronzing. When faced with damaged data, the quality of the drive and its firmware will influence whether the data stream corresponds to the original content or not.

So why would ripping CDs result in less than perfect copies - I thought digital information would almost always be read correctly?

I'm not sure how it'll be in decades to come, but so far I've had a lot of luck even with "soiled" CDs from the 90s and error correction seems to make up for a lot. They are far more robust than DVDs, at least, which can generally go in the garbage beyond a certain state.
next

Legal | privacy