Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Red Book vs TOC in EAC logs, cue sheets and AccurateRip (Read 1068 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Red Book vs TOC in EAC logs, cue sheets and AccurateRip

Hi,

Recently I've started writing an app like CueTools for OS X. To make sure I handle corner cases properly, I looked into the Red Book standard (IEC 908), which led to some questions that probably only Hydrogenaudio members can answer properly :)

According to the Red Book, an audio CD's lead-in area contains the TOC of the disc. This TOC contains the start offsets of the 01 index of each track (and the lead-out area as track 170). These offsets are in absolute time (ATIME), which is 00:00:00 at the start of the first track's 00 index – see the bottom of this picture:



However, there's one clause in the Red Book (17.5.1 – Mode 1 for DATA-Q) that says:
Quote
The values give the start position of the track on the absolute time scale (AMIN, ASEC, and AFRAME) with an accuracy of +-1s.

This means that the TOC entries do not necessarily line up exactly with the track boundaries in the Q and P channels! I started wondering based on what information do rippers like EAC, XLD and dbPoweramp split the discs' contents into tracks? Is it the TOC in the lead-in area (which can be off by 1 second), or the "real" track boundary present in the P/Q channels?

Another question I came up with is concerning indexes (aka gaps) and cue sheets. Since index information (X in Red Book parlance) is only present in the Q channel, I assume what EAC does when one chooses to detect gaps, is that it looks for index boundaries in the Q channel. Upon ripping, the index offsets are saved into a cue sheet, which means that the cue sheet is based on the Q channel. However what if I choose to not detect gaps? Is the cue sheet based on the TOC from the lead-in area?

Also, the Red Book explicitly says that the first track's 00 index is at least 2 seconds long, which means that the first track's offset in the TOC must be greater than 150 frames in case the 00 index is the minimal 2 seconds. However in the EAC logs I usually find values around 00:00:00 for the first track's TOC entry. How is this possible? Does EAC subtract 150 frames from the TOC offsets before writing them to the log?

Also, since the first track's 00 index is at most 3 seconds long (see the picture), is the presence of a HTOA mean that the given disc is non-Red Book compliant? (I've read that HTOA's are in the 00 index of the first track)

And last, but not least: the AccurateRip disc ID depends on the TOC. If I detect gaps and generate a cue sheet, it'll contain index information from the Q channel. Let's say that there are discrepancies between the TOC and the Q channel indexes (+-1 s allowed). Does this mean that I can only generate the correct AccurateRip disc ID if I parse the TOC info from the EAC log, instead of reconstructing it from the cue sheet?

Re: Red Book vs TOC in EAC logs, cue sheets and AccurateRip

Reply #1
Rippers which specialize in audio (rather than copy-protected game discs) just use the lead-in's TOC, not subcode, for determining track boundaries, i.e. the index 01 points. There were some versions of EAC which had a "manual TOC detection" option to check subcode instead, but the feature was removed for fear of EAC being deemed a copy-protection circumvention tool under German law.

Gap and other index detection can only be done by scanning subcode. The audio-focused rippers all still use the TOC for the index 01 positions—so the logs, cue sheets, and disc IDs are going to be consistent and are not going to be dependent on subcode. The rippers use the subcode only for finding where the non-01 indexes begin.  There are different methods and the results can vary. You may want to search in the Club Myce forum for info as well.

Re: Red Book vs TOC in EAC logs, cue sheets and AccurateRip

Reply #2
Thank you for the helpful answer!

So basically index information (apart from 01 indexes) is a best-effort thing only to "augment" cue sheets, and rippers split the extracted disc image into chunks based on the TOC in the lead-in area.

Do you have any info about the other two issues I brought up? Namely, do EAC implicitly subtract 150 frames from the TOC in the logs (as 00:00:00 in the TOC would refer to the start of track 01 index 00 instead of index 01); and whether HTOAs violate the Red Book standard (as the standard maximizes the length of track 01 index 00 by 3 seconds)?

Re: Red Book vs TOC in EAC logs, cue sheets and AccurateRip

Reply #3
The 2 second lead-in is the minimum portion of the Index 00 of Track 1. Beyond 2 seconds shows up in the TOC in the EAC log.
korth

Re: Red Book vs TOC in EAC logs, cue sheets and AccurateRip

Reply #4
Regarding the max. 3-second thing, I think you are talking about the requirements for the P channel. http://www.chipchapin.com/CDMedia/cdda9.php3 may help explain a little better. If I understand correctly (maybe I don't), the pause flag has to be set for 2 to 3 seconds before the start of what the Q channel would say is track 01 index 01. For other tracks it has to be set for 2 seconds, and the lead-out has special requirements. You can still have longer or shorter gaps, including HTOA. The P channel is just a crude signal saying (when one) that the equivalent of the Q channel's index 01 is approaching, or (when zero) that that boundary has passed. The boundary corresponds to the info in the TOC.

But is the P channel ever used?

Why does this matter for your app?

Re: Red Book vs TOC in EAC logs, cue sheets and AccurateRip

Reply #5
Nope, I was just curious. Thanks for the clarification! Upon re-reading the standard it seems that the 3 second limit indeed refers to the P channel being 1, not the 00 index in the Q channel.

 

Re: Red Book vs TOC in EAC logs, cue sheets and AccurateRip

Reply #6
When I rip using EAC I always get 2sec or more pregap for track 1, but TOC is always 0:00 for 2 sec pregap, only if pregap is longer the TOC is adjusted to that. for example 2:33 s pregap reslts in TOC start at 0:33.

 
SimplePortal 1.0.0 RC1 © 2008-2021