Secure ripping

From Hydrogenaudio Knowledgebase

Secure Ripping

What is Secure Ripping?

Secure ripping is the process of making sure there were no errors during the extraction of audio from a CD. Popular Windows CD rippers, such as CDex and EAC try to ensure a bit-perfect rip for every track by checking the results, and re-reading any bad areas (from scratches) as many times as needed using read offsets, etc. Max and Rubyripper provide similiar results as alternative secure rippers for Mac OS/X and Linux/BSD respectively using their own effective correction mechanisms.

A bit-perfect rip may not always be possible, and so these programs (EAC especially) will report on any errors that could not be corrected for various reasons, allowing you to examine or attempt to correct the problems by analyzing a log file, using AccurateRip, or by looking at other Drive Databases

Secure Ripping Comparison

Definitions

Accurate Stream

Accurate Stream is the ability to avoid jitter. Each CD drive reads audio discs slightly out (a number of samples), if your CD drive supports 'Accurate Stream' it will be a constant value, this should be the same for each particular make and model of CD-ROM Drive

Caching

Caching is the ability of the CD-ROM drive to hold a certain amount of samples in a buffer. Every CD-ROM cache can be "flushed".

C2 Error Pointers

CD-ROM's have differing levels or error recognition and correction. C2 error pointers are read errors by a compact disc that can usually be detected by error detecting and correction scheme.

EAC and dBPowerAMP

EAC and dbPowerAMP both feature powerful correction mechanisms that works with your CD-ROM drive. Some of these features include AccurateStream, Caching, C2 error pointers, and AccurateRip. For a description of the Exraction techology used on each of these consult their respective wiki pages above.

Accurate Stream

Question: Do EAC and dbPowerAMP work on drives that support AccurateStream?
Yes: EAC Do EAC and dbPowerAMP work on drives that support AccurateStream

Caching

Question: Do EAC and dbPowerAMP work on drives that support caching?
Yes: EAC and dbPowerAMP work on drives that support caching

C2 Error Pointers

Question: Do EAC and dbPowerAMP work on drives that utilize C2 error pointers?
Yes: EAC and dbPowerAMP work on drives that support C2 error pointers

AccurateRip

AccurateRip is a drive database that stores read offsets for a number of user submitted drives that allows you compare your CD rips to other people's. You can anaylze offset corrections on each drive and discover how it varies from drive to drive. AccurateRip database also lists what drives have AccurateStream, cache audio data, and use C2 error pointers.

Note: AccurateRip due to it's liscensing agreement only works with EAC and dbPowerAMP.

Ripping Modes

EAC has two additional modes that can be configured. One is known as "Secure Mode" and the other is known as "Burst Mode". Secure Mode is the recommended mode to use as it goes through the pain staking process of over-anaylzing CD's that may have scratches on them and correcting any bad sectors of audio data. Burst Mode is used for CD's that either have "copy protection" on them or are extremely scratched. It's considered a last ditch effort to recover the audio data from your CD's.

CDex

CDex externally uses the cdparanoia libraries. It is a bit different than most other CD-DA extration tools. It contains few-to-no extra features ("Too many features spoil the broth"), concentrating only on the ripping process and knowing as much as possible about the hardware performing it. cdparanoia will read correct, rock-solid audio data from inexpensive drives prone to misalignment, frame jitter, and loss of streaming during atomic reads. cdparanoia will also read and repair data from CDs that have been damaged in some way using interpolation and padding sectors with silence or 0 bytes.

Accurate Stream

Question: Does cdparanoia work on drives that support AccurateStream?
Yes: cdparanoia works on drive that support AccurateStream

Caching

Question: Does cdparanoia work on drives that support caching?
No: cdparanoia works best on drives that don't support caching.

C2 error pointers

Question: Does cdparanoia work on drives that utilize C2 error pointers?
No: The current existing libraries do not support C2 error pointers

Ripping Modes

Max

Max externally uses the cdparanoia libraries in conjunction with it's own secure ripping algorithm. Max correction mechanism is quite similiar to Rubyripper. The algorithm uses a comparison feature in order to determine how many times Max should rip and compare sections (maximum retries). It is done on a sector-by-sector basis, rather then byte-by-byte basis. Max can additionally generate a SHA-256 checksum for each additional section in order to more accuratly determine dissimiliarities in a rip. Max differs in that it does not have a direct reliance on cdparanoia for extraction, but instead uses C2 error pointers very similiar to EAC.

Accurate Stream

Question: Does Max work on drives that support AccurateStream?
Yes: Max works on drive that support AccurateStream

Caching

Question: Does Max work on drives that support caching?
No: Max works best on drives that don't support caching.

C2 error pointers

Question: Does Max work on drives that support C2 error pointers?
Yes: Max current existing libraries support C2 error pointers

Rubyripper

Rubyripper externally uses the cdparanoia libraries in conjunction with it's own secure ripping algorithm. Rubyripper correction mechanism goes beyond that of cdparanoia. Every track gets ripped at least twice and is byte compared with the Ruby cmp feature. If any differences are found, each of the 1,000 bytes of the two files is compared. The next trial run looks to see if differing positions or a match can be found. (1,000 bytes is about 0.006 seconds). The main underlying Philosophy is that an erroneous read of an underlying ripper will produce random results. This seems so far to be correct. A possibility still exists that with random results the same result will be wrong.

If the full 1,000 bytes are erroneous, than a false repair seems to be highly unlikely since there are 1000×256 possibilities in theory. (As a byte consists of 8 bits, 28=256). This would need an infinite amount of trials to match. The main principle however is, the more trials that are needed, consequently the higher a chance of a false repair. Suppose only 3 bytes in a sample of 1,000 bytes give random information. This would still mean 3×256 possibilities within each of these bytes, really 2 bits could be a problem. This reduces the possibilities to 3×2×2 = 12 possibilities. So, a false repair still seems to be possible. One has to wonder though: can 3 bytes actually be heard in a wav file that produces 180.000 bytes per second?

In conclusion: Rubyripper won't guarantee a consequent MD5-sum on tracks that needed correction. However it will repair any files so that it's impossible to successfully blind-test with the original. The log file will report any position that needed more than 3 trials, so you can check the position yourself.


Accurate Stream

Question: Does Rubyripper work on drives that support AccurateStream?
Yes: Rubyripper works on drive that support AccurateStream

Caching

Question: Does Rubyripper work on drives that support caching?
No: Rubyripper works best on drives that don't support caching.

C2 error pointers

Question: Does Rubyripper work on drives that support C2 error pointers?
No: Rubyripper and the current existing libraries do not support C2 error pointers

External links