AccurateRip: Difference between revisions

From Hydrogenaudio Knowledgebase
(→‎Ripped track checksums: added caveat about AccurateRip being based on "complete" rips)
(→‎Drive read offsets: added an explanation of overreading)
Line 6: Line 6:
The AccurateRip database allows one to find out the read offset, which is a number, for a given make & model of CD drive. This number can then be used by DAE software to ensure that each track is ripped from its exact start to its exact finish.
The AccurateRip database allows one to find out the read offset, which is a number, for a given make & model of CD drive. This number can then be used by DAE software to ensure that each track is ripped from its exact start to its exact finish.


The offset is given in samples. One "sample" on an audio CD is 4 bytes, consisting of a 2-byte left-channel value and a 2-byte right-channel value. There are 2352 bytes, or 588 samples, in each sector of an audio CD, corresponding to 1/75th of a second of sound. Therefore, an AccurateRip offset of +134, for example, means the drive consistently delivers data from 536 bytes ''behind'' (earlier than) where it was asked to read from, so the DAE software needs to look that far ahead (hence the positive offset) in order to get the right data.
The offset is given in samples. One "sample" on an audio CD is 4 bytes, consisting of a 2-byte left-channel value and a 2-byte right-channel value. There are 2352 bytes, or 588 samples, in each sector of an audio CD, corresponding to 1/75th of a second of sound. Therefore, an AccurateRip offset of +134 means the drive consistently delivers data from 536 bytes ''behind'' (earlier than) where it was asked to read from, so the DAE software needs to look that far ahead (hence the positive offset) in order to get the right data.
 
When offsets are taken into account, the DAE software might have to ask the drive to "overread" into the lead-in or lead-out portions of the disc, where there's no audio data. Some drives can't be asked to do it, some drives will try to do it and fail, and some will just return null samples (a stream of "0" bytes, a.k.a. digital silence). If the drive can't overread, then there will be samples missing from the extracted track. The DAE software can correct for this by padding the track with digital silence so it's the correct length.


==Ripped track checksums==
==Ripped track checksums==

Revision as of 07:30, 30 September 2009

AccurateRip is a database that accepts and supplies two things: 1. estimates of the accuracy of the digital audio extraction (DAE) capabilities of CD-ROM/CD-RW drives (specifically, their read offsets), and 2. checksums for audio tracks extracted with those drives.

Drive read offsets

Very few CD drives actually start reading data from audio CDs exactly at the sector requested by DAE software. There are drives that are off by over 1 sector (1/75th of a second), but most are off by much less (1/250 to 1/350 second). Most modern CD drives have "Accurate Stream" technology, so there's no "jitter", meaning in this case that the variance is consistent from read to read, and will tend to be the same for all drives of a certain make & model.

The AccurateRip database allows one to find out the read offset, which is a number, for a given make & model of CD drive. This number can then be used by DAE software to ensure that each track is ripped from its exact start to its exact finish.

The offset is given in samples. One "sample" on an audio CD is 4 bytes, consisting of a 2-byte left-channel value and a 2-byte right-channel value. There are 2352 bytes, or 588 samples, in each sector of an audio CD, corresponding to 1/75th of a second of sound. Therefore, an AccurateRip offset of +134 means the drive consistently delivers data from 536 bytes behind (earlier than) where it was asked to read from, so the DAE software needs to look that far ahead (hence the positive offset) in order to get the right data.

When offsets are taken into account, the DAE software might have to ask the drive to "overread" into the lead-in or lead-out portions of the disc, where there's no audio data. Some drives can't be asked to do it, some drives will try to do it and fail, and some will just return null samples (a stream of "0" bytes, a.k.a. digital silence). If the drive can't overread, then there will be samples missing from the extracted track. The DAE software can correct for this by padding the track with digital silence so it's the correct length.

Ripped track checksums

Once all the samples for a track have been extracted and put into a file such as a WAV, a checksum can be generated to summarize the sample data. Identical data will produce identical checksums. If the data is the slightest bit different, the checksums will usually be very different. The checksums derived from the same tracks from the same pressings of the same CDs, so long as drive offsets have been accounted for, can be compared in order to determine whether the extraction was error-free. That is, if you rip a track and find that your checksum matches what everyone else got, then you can be confident there are no missing or incorrect samples (or that you've all got exactly the same damage, which is nearly impossible). See the secure ripping article for more on this subject.

The AccurateRip database contains checksum data for the tracks on thousands of CDs. DAE software can use this info to decide whether to try re-reading a track that produced a different checksum than was expected.

The AccurateRip checksums are based on complete track rips; they include pre-track gaps and digital silence at the beginning and end of tracks. They also assume that when an offset-corrected drive "overreads" beyond the boundaries of the disc's audio data, the track is padded with digital silence. So if your DAE software is configured to trim silence, to not zero-pad overreads (if necessary), or to do anything with gaps other than put them at the end of the preceding track (as normally happens when gaps aren't taken into account), then it's unlikely the checksums of your rips will be compared against or submitted to those in the AccurateRip database.

Submitting offsets and checksums

The database is designed to be anonymously accessed by DAE software, via HTTP. Submitting data should only be done through such software.

External links