Search: |
|
| | LinkBack | Thread Tools |
| | #26 |
| CD Freaks Expert Join Date: Dec 2004 Location: Guadalajara, Mexico
Posts: 205
| Re: Offsets handling (syncing of audio data vs. Q channel) Seems that Andre Wiethoff (EAC) found a way to determine the exact quantity of samples that his Plextor Ultraplex 23TS reading was deviating from the position where 1st audio sample "should" be. It's said that his experiment was based on reading after the program area, inside lead-out (both areas as seen by his drive, not the real ones, BTW, not every drive can do that) and looking for the end of back noise of the last track of a CD with analog recordings. That is the beginning of the AccurateRip project, that uses reference CDs to help users to find the offsets of their particular drives. "Stream is Accurate" feature in the drive is a must. http://users.pandora.be/satcp/eacoffsets02.htm#- http://accuraterip.com I would like to know what you think. |
| | |
| | #27 | |||
| CD Freaks Expert Join Date: Oct 2004 Location: Delft, The Netherlands
Posts: 58
| Re: Offsets handling (syncing of audio data vs. Q channel) Quote:
At about the same time I started this thread here raising the subchannel/audiochannel synchronisation problem, I did the same at the EAC forum. I didn't get an answer there, unfortunately. Quote:
Quote:
However, for all the interestingness, I only see windows executables there (I don't do windows). I need access to the source code to assess its technical merits. Furthermore, they should open up the description of their database format; it seems like you need their particular software to access it. Best regards, Sidney | |||
| | |
| | #28 | ||||
| CD Freaks Expert Join Date: Dec 2004 Location: Guadalajara, Mexico
Posts: 205
| Re: Offsets handling (syncing of audio data vs. Q channel) Quote:
Quote:
Quote:
Quote:
| ||||
| | |
| | #29 | |||
| CD Freaks Expert Join Date: Oct 2004 Location: Delft, The Netherlands
Posts: 58
| Re: Offsets handling (syncing of audio data vs. Q channel) Quote:
Quote:
Unless, of course, I shift the data in the wrong direction ![]() Quote:
What I am thinking about is the song database, i.e., the checksums of perfect extractions. That's quite an asset; in fact, one of the long-term goals of my hardware cd hacking project is to produce something similar. I would like to be able to access the data they collected. Best regards, Sidney | |||
| | |
| | #30 |
| New on Forum Join Date: Apr 2002
Posts: 13
| Re: Offsets handling (syncing of audio data vs. Q channel) Hi, Maybe this is a bit offtopic, but, does anyone know why PlexTools agrees with EAC as to what is the "reference" offset for extraction? Did they choose the same offset just to follow EAC's user base and avoid confusion? Or did they have other reasons? Just curious. Regards. |
| | |
| | #31 | |||
| CD Freaks Expert Join Date: Dec 2004 Location: Guadalajara, Mexico
Posts: 205
| Re: Offsets handling (syncing of audio data vs. Q channel) Quote:
Quote:
Quote:
| |||
| | |
| | #32 |
| CD Freaks Expert Join Date: Jan 2004
Posts: 775
| Re: Offsets handling (syncing of audio data vs. Q channel) For what it's worth... I am involved with the mastering process at huge CD/DVD factories all over the world. Our software allows the mastering engineer to set the skew (offset between main and subchannel) to whatever they like (including negative!). And, the Red Book does allow +/- 75 sectors. |
| | |
| | #33 |
| CD Freaks Expert Join Date: Dec 2004 Location: Guadalajara, Mexico
Posts: 205
| Re: Offsets handling (syncing of audio data vs. Q channel) Thanks a lot RichMan for that field based confirmation. So, we're close to a concensus. What we would just love to know is... What is in the perfect case (skew=0), the exact physical byte quantity between the 1st byte of a subcode block and the related 1st audio sample, and if there's a congruence with EAC, AR and Plextools offset correction. |
| | |
| | #34 |
| CD Freaks Expert Join Date: Dec 2004 Location: Guadalajara, Mexico
Posts: 205
| N+2 sections for N sectors. When feeding the 2352 bytes of a sector to the CIRC encoder, it will interleave them with another bytes in such a way, that will use space from 3 sections of 98 channel frames when being held on a CD. Our CD will have a sequence of such sections, addressed according program duration, adjacent to 2 extra sections that still hold user bytes. What are the addresses of those 2 sections (PG and/or LO)? |
| | |
| | #35 |
| CD Freaks Expert Join Date: Jan 2004
Posts: 775
| Re: Offsets handling (syncing of audio data vs. Q channel) @reddish To answer the first post in this thread (I think)... First, the subcode is NOT interleaved like the audio data. One subcode byte is added to the mix after the CIRC interleaving of audio data. If you are capturing the raw EFM (HF) signal and your software can find the SYNC and de-interleave the data, then you have what you are looking for. Once you find the subcode SYNC pattern, the audio data that lies beneath will be the audio data that goes with that decoded subcode frame. What I mean to say is this: If you de-interleave the raw EFM and then find the first subcode SYNC and then decode the next 97 EFM frames to find that the Q channel indicates 00:02:00...then the first byte of audio that was coupled with that first EFM frame is the first byte of audio for 00:02:00. The de-interleaving process is not 'drive' dependent. There is only one way that the audio is interleaved and there is only one way for it to be de-interleaved (refer to Red Book). If your software de-interleaves correctly, then whatever A-Time that the Q channel says you are reading is indeed the correct audio sample that goes with that A-time. Where drives come into play is in the delay of their circuitry for the subcode stream and the audio stream to the final output. You have bypassed this if you are checking the raw EFM data from the laser pickup so there is no reason at all to consider any particular drive in this issue. Drive 'skew' is a totally different subject. When you decode the Q bit of subcode and find it to be 00:02:00, then rest assured that the first sample of audio that goes with that starting frame (that forms 00:02:00) is the first audio sample for that particular A-Time. There is no possible way to be more precise. What is on the CD is the 'bible' if you will, right or wrong. None of us can decide if this is what was intended or not. Only the recording studio can set us straight. I hope this makes sense. If not, feel free to argue/ask... Rich |
| | |
| | #36 | ||||||||||||
| CD Freaks Expert Join Date: Oct 2004 Location: Delft, The Netherlands
Posts: 58
| Re: Offsets handling (syncing of audio data vs. Q channel) Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
Let's call the sector you refer to (00:02:00 abs.time) "sector zero". It can be recognized by looking at the Q subchannel, decoding 98 consecutive frames starting with the special SYNC0 and SYNC1 EFM patterns; this gives 16 bytes of Q channel data, and thus an A-time stamp (the first two frames contain the SYNC1 and SYNC2 EFM patterns and contribute no subchannel data). The Q subchannel data thus identifies the first sector, and the first frame. Let's call the first (SYNC0) frame of this sector zero "frame zero". "frame zero" looks like this: 24 bit sync, 3 bits merge, 14 bits EFM-CODED SUBCHANNEL DATA, 3 bits merge, 32* (14 bits EFM-CODED AUDIO/CRC, 3 bits merge). After throwing away the 24-bit SYNC and merge bits, and doing EFM decoding we are left with the following: 1 byte SUBCHANNEL DATA (in this case, the EFM pattern is 00100000000001 or 'SYNC0' so we don't encode any actual subchannel information) 24 bytes worth of AUDIO data 8 bytes worth of ERROR CORRECTION data (for the audio data). When decoding, the AUDIO data found in the 24 bytes of frame zero spread out over 106 frames. This means that the audio data corresponding to the time frame covered by the first frame (which is the first 1/75/98 = 1/7350 seconds of audio data of the CD - 6 samples worth of data) comes from other frames surrounding (or preceding, or following) our "frame zero". Now my question is precisely this: relative to "frame zero", where do the 24 bytes comprising the first 6 samples of the CD come from, exactly? I know that it must look like this: L0 = to_signed(frame[OFFSET-108][ 0]*256 + frame[OFFSET-105][ 1]) L2 = to_signed(frame[OFFSET-100][ 2]*256 + frame[OFFSET- 97][ 3]) L4 = to_signed(frame[OFFSET- 92][ 4]*256 + frame[OFFSET- 89][ 5]) R0 = to_signed(frame[OFFSET- 84][ 6]*256 + frame[OFFSET- 81][ 7]) R2 = to_signed(frame[OFFSET- 76][ 8]*256 + frame[OFFSET- 73][ 9]) R4 = to_signed(frame[OFFSET- 68][10]*256 + frame[OFFSET- 65][11]) L1 = to_signed(frame[OFFSET- 46][16]*256 + frame[OFFSET- 43][17]) L3 = to_signed(frame[OFFSET- 38][18]*256 + frame[OFFSET- 35][19]) L5 = to_signed(frame[OFFSET- 30][20]*256 + frame[OFFSET- 27][21]) R1 = to_signed(frame[OFFSET- 22][22]*256 + frame[OFFSET- 19][23]) R3 = to_signed(frame[OFFSET- 14][24]*256 + frame[OFFSET- 11][25]) R5 = to_signed(frame[OFFSET- 6][26]*256 + frame[OFFSET- 3][27]) Here, * Lx and Rx denote the left/right samples corresponding to the first 1/7350'th second of the CD; * frame[i][j] is the j'th byte of audio data (0<=j<=23) in the i'th frame (i=0 --> frame zero) * OFFSET is a rather arbitrary integer that I am looking for. Quote:
Quote:
Quote:
Best regards, Sidney | ||||||||||||
| | |
| | #37 | |
| CD Freaks Expert Join Date: Oct 2004 Location: Delft, The Netherlands
Posts: 58
| Re: Offsets handling (syncing of audio data vs. Q channel) Quote:
(And where I wrote 'CRC', I meant 'CIRC'). Regards, Sidney | |
| | |
| | #38 | |
| CD Freaks Expert Join Date: Oct 2004 Location: Delft, The Netherlands
Posts: 58
| Re: Offsets handling (syncing of audio data vs. Q channel) Quote:
Then, could you quote the relevant section from the RedBook please? Call me pedantic (you wouldn't be the first ;-)) - if it allows +/- 75 sectors, it should also say +/- 75 sectors relative to what. Regards, Sidney | |
| | |
| | #39 | |
| CD Freaks Expert Join Date: Oct 2004 Location: Delft, The Netherlands
Posts: 58
| Re: N+2 sections for N sectors. Quote:
Regards, Sidney | |
| | |
| | #40 | |
| CD Freaks Expert Join Date: Jan 2004
Posts: 775
| Re: Offsets handling (syncing of audio data vs. Q channel) Quote:
After skimming through the Red Book again, it seems the +/- 75 sectors is in reference to the skew between TOC track start times and actual track start times in the program area (Q-channel change points). Sorry for the mistake here. | |
| | |
| | #41 | |
| CD Freaks Expert Join Date: Jan 2004
Posts: 775
| Re: Offsets handling (syncing of audio data vs. Q channel) reddish, I have lots of resources where I work and I will seek the answers to your questions. Quote:
If you already have the de-interleave function, then once you de-interleave the data, you DO know where each byte of audio came from. If you decode the raw stream and find the starting point (sync0) of frame 00:02:00 and then you de-interleave enough times to get a complete set of 24 audio bytes that go together, you will then have the audio samples that go with 00:02:00. Sorry if I'm not explaining it clearly. It's really a tough topic and I am in no way an expert on this. If you find flaws in my replies, just point them out and I'll check into it (I'm still learning too). Rich | |
| | |
| | #42 | |
| Moderator Join Date: Apr 2001 Location: London, UK
Posts: 599
| Re: Offsets handling (syncing of audio data vs. Q channel) Quote:
| |
| | |
| | #43 | |
| CD Freaks Expert Join Date: Dec 2004 Location: Guadalajara, Mexico
Posts: 205
| N+2to3 sections for N sectors. Quote:
A consecuence is that a whole sector will end up using 203 channel frames, 196 of them will form two sections, while the another 7 will be part of another section (before or after those 2), or be divided in 2 channel frame sequences that will belong to another 2 sections (one before the first, and the other after the second). Trascendence is spiral must have at least N + 2 to 3 channel frame sections to hold N sectors (it will hold 3 to 4 incomplete sectors, have at least 2 to 3 pointless addresses at spiral's end, if more, even have sectors without an existant address). If we refer to sectors at both ends of program, it's easy to see at least 105 channel frames outside program area will have to hold user data. Philips must allow PG or LO or both to hold such data, if there's a restriction for one of them, degree of freedom for main to sub relationship shortens, so we are in a smaller range to "canonical reference". | |
| | |
| | #44 | |
| New on Forum Join Date: Dec 2004
Posts: 17
| Re: Offsets handling (syncing of audio data vs. Q channel) Quote:
It certainly is the most logical choice and richman says " Our encoder will normally generate the first 2 seconds (00:00:00 to 00:02:00)". So that would mean to me when you get to first frame at 00:02:00 then "L0" (left channel 0th sample MSB) should be the first byte in the payload of that frame since you dont want the audio data to spill over into frames before 00:02:00. It would also mean that the first few frames starting at 00:02:00 are going to have to have dummy audio bytes to fill in the rest of there 24 byte payload. Maybe this is the reason for having the pregap area is to 'clear out' the hardware so that when you reach the start of audio data the decoding buffers will be in a determinate state. Assuming that OFFSET is 108 would also mean that the final sector would have to have some trailing sectors (lead-out?) to be able to reconstruct all the audio in the last frame. I guess this is implied since the first interval of pregaps(that follow leadin) and postgaps/leadouts that follow data and audio tracks are supposed to have the same format for the Q subchannel in regards to the control field and Q-mode(as mentioned in ecma130) to the previous track ,i.e. when you reach the end of a audio ,data track or leadin you can read into the gap area to reconstruct whats in the final sector for that track. Since the CDrom format is built on top of audio, could you try reading a cdrom and triggering your reading setup to a certain known sector and comparing the 'raw' 2352 data that you read from your computer to what you read with your hardware? You said you trigger to a paticular sound on the CD so you should be able to do the same with the 'raw' 2352 sector data which is basically audio samples. If you can reconstruct it with OFFSET=108 then you have the answer. It boils down to where are the audio samples scattered about relative to the frames inside one sector. And regarding the topic of 'track offsets', since an audio sector timeframe is determined by the Q subchannel and that the subchannel data is not subjected to massive interleaving and error correction like the 24 byte payload then you dont have 100% assurance that it will be correct all the time. Maybe this accounts for the 'offsets' people are seeing. Assuming that a cd drive waits till Absolute time 00:02:00 before decoding audio samples, I could see that if the Q channel was corrupted in say the first few sectors starting at or before 00:02:00 and told the drive the absolute time was 00:01:xx then all of sudden the time is 00:02:0x and consistent, then the drive will have to make some choices about what audio data to send. reddish: I have to admit this is one of the most interesting threads brought up in a forum and has presented a lot of interesting topics. I hope you spend quite a bit of time to present your project to the world in the same precise and informative manner that you present information and questions in your posts. | |
| | |
| | #45 | |
| Moderator Join Date: Apr 2001 Location: London, UK
Posts: 599
| Re: Offsets handling (syncing of audio data vs. Q channel) Quote:
| |
| | |
| | #46 |
| New on Forum Join Date: Dec 2004
Posts: 17
| Re: Offsets handling (syncing of audio data vs. Q channel) Maybe this sheds some light to the track offset problem: /Quote/<richman> The skew setting during mastering is in sectors (not sure why)... After skimming through the Red Book again, it seems the +/- 75 sectors is in reference to the skew between TOC track start times and actual track start times in the program area (Q-channel change points). Sorry for the mistake here. /End Quote/ in ecma103 it talks about the Q channel in the leadin containing information on the contents of the disk, refering to the track time data as 'items': "An item indicates the address of the beginning of the user data of an Information Track. It is expressed in absolute time with an accuracy of ± 1 s." and again: "Thus, the table of contents points to the start of an Information Track on the disk in terms of the absolute time in the Control bytes with an accuracy of ± 1 s." That would explain the +/- 75 sectors. I just want more clarification on what exactly is modified with this skew setting. Does it mean that audio sectors will remain in there normal starting position after pregap but the Q channel time stamps will be 'skewed' relative to all the sectors? Would be nice to see some example or diagram to explain this. And why is this large skew setting in the specification? Was it to compensate for the hardware (when CD was being developed) or to allow some last minute adjustment to a recording during mastering to move the silence to the front of the tracks or the end? |
| | |
| | #47 | |
| CD Freaks Expert Join Date: Dec 2004 Location: Guadalajara, Mexico
Posts: 205
| Re: Offsets handling (syncing of audio data vs. Q channel) Quote:
| | v | |
| | |
| | #48 | |
| CD Freaks Expert Join Date: Oct 2004 Location: Delft, The Netherlands
Posts: 58
| Re: Offsets handling (syncing of audio data vs. Q channel) Quote:
Regards, Sidney | |
| | |
| | #49 | |
| CD Freaks Expert Join Date: Dec 2004 Location: Guadalajara, Mexico
Posts: 205
| Re: Offsets handling (syncing of audio data vs. Q channel) Quote:
| |
| | |
| | #50 | |
| CD Freaks Expert Join Date: Dec 2004 Location: Guadalajara, Mexico
Posts: 205
| Re: Offsets handling (syncing of audio data vs. Q channel) Quote:
![]() Thanks. | |
| | |
![]() |
| |
| |
| If you can't find where you are looking for, then become a member and get an answer fast! We have thousands of people online every moment of the day to help you! Click here |
| Can't find where you are looking for? Search our knowledgebase! | |
| | |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| ConvertXtoDVD: Audio Syncing Problems | LazLong | VSO Software | 1 | 05-04-2007 01:30 |
| WHY am I now having problems with syncing audio and visual?? | Oz12 | Nero & InCD | 0 | 23-03-2007 21:04 |
| Audio syncing problems | Kgo | Audio | 1 | 28-12-2005 20:11 |
| VOB Audio syncing | MassDistortion | Video Edit Software | 5 | 12-12-2005 15:04 |
| sub-channel data | kryptonite | Newbie Forum | 1 | 21-11-2003 03:05 |
| Thread Tools | |
| |
| People who found this thread also searched for: |