dbpoweramp  

Go Back   dbpoweramp > Other Topics > Developing with dBpoweramp (Scripting, etc)

Reply
 
Thread Tools Display Modes
Old 04-03-2008, 09:28 AM   #1
Spoon
Da Man
 
Spoon's Avatar
 
Join Date: Apr 2002
Posts: 17,893
FLAC & Ogg Vorbis Storage of CDTOC

We have been asked over and over again by individuals / companies to offer storage of a CD TOC (table of contents from Audio CD) in Vorbis Comments, as no standard was forthcoming we have acted in creating a new standard:

Tag Name:

CDTOC

Table of contents stored as a string made up from:

[audio trackcount]+[first audio track address]+[second audio track address]....

Track addresses are stored (LBA Address + 150), that is 2 seconds in for the first track.

Special cases:

CD Extra discs: the lead out address is added to the end, track count is still just for audio tracks.
[data][audio] discs: as a normal CD, except on the end is +X[LBA of Data Track + 150]

Example of ordinary Audio CD:

Code:
LBA FirstIndex: 1 last Index: 10
Type: Audio Track 1  LBA Address: 0  Length: 00:04:08.733
Type: Audio Track 2  LBA Address: 18655  Length: 00:04:34.760
Type: Audio Track 3  LBA Address: 39262  Length: 00:04:19.573
Type: Audio Track 4  LBA Address: 58730  Length: 00:04:14.867
Type: Audio Track 5  LBA Address: 77845  Length: 00:03:27.960
Type: Audio Track 6  LBA Address: 93442  Length: 00:03:09.867
Type: Audio Track 7  LBA Address: 107682  Length: 00:04:02.466
Type: Audio Track 8  LBA Address: 125867  Length: 00:03:44.040
Type: Audio Track 9  LBA Address: 142670  Length: 00:04:04.334
Type: Audio Track 10  LBA Address: 160995  Length: 00:04:37.666
Type: Lead Out  LBA Address: 181820

ID Tag CDTOC=A+96+4975+99F4+E600+130AB+16D98+1A538+1EC41+22DE4+27579+2C6D2
Example of CD with Hidden First Track:

Code:
LBA FirstIndex: 1 last Index: 10
Type: Audio Track 1 LBA Address: 8925 Length: 00:05:35.266
Type: Audio Track 2 LBA Address: 34070 Length: 00:04:25.667
Type: Audio Track 3 LBA Address: 53995 Length: 00:04:37.267
Type: Audio Track 4 LBA Address: 74790 Length: 00:03:03.800
Type: Audio Track 5 LBA Address: 88575 Length: 00:04:23.533
Type: Audio Track 6 LBA Address: 108340 Length: 00:05:59.733
Type: Audio Track 7 LBA Address: 135320 Length: 00:04:14.627
Type: Audio Track 8 LBA Address: 154417 Length: 00:04:05.533
Type: Audio Track 9 LBA Address: 172832 Length: 00:05:15.374
Type: Audio Track 10 LBA Address: 196485 Length: 00:08:58.200
Type: Lead Out LBA Address: 236850

ID Tag CDTOC=A+2373+85AC+D381+124BC+15A95+1A7CA+2112E+25BC7+2A3B6+3001B+39DC8
Special Case 1, Example of CD Extra CD:

Code:
LBA FirstIndex: 1 last Index: 14
Type: Audio Track 1  LBA Address: 0  Length: 00:04:10.413
Type: Audio Track 2  LBA Address: 18781  Length: 00:03:39.093
Type: Audio Track 3  LBA Address: 35213  Length: 00:03:11.534
Type: Audio Track 4  LBA Address: 49578  Length: 00:04:03.426
Type: Audio Track 5  LBA Address: 67835  Length: 00:03:36.894
Type: Audio Track 6  LBA Address: 84102  Length: 00:03:59.080
Type: Audio Track 7  LBA Address: 102033  Length: 00:04:21.773
Type: Audio Track 8  LBA Address: 121666  Length: 00:03:21.227
Type: Audio Track 9  LBA Address: 136758  Length: 00:03:56.213
Type: Audio Track 10  LBA Address: 154474  Length: 00:04:35.240
Type: Audio Track 11  LBA Address: 175117  Length: 00:04:04.000
Type: Audio Track 12  LBA Address: 193417  Length: 00:04:09.947
Type: Audio Track 13  LBA Address: 212163  Length: 00:03:57.160
Type: Data Track 14  LBA Address: 229950  Length: 00:11:27.480
Type: Lead Out  LBA Address: 281511

ID Tag CDTOC=D+96+49F3+8A23+C240+10991+1491C+18F27+1DBD8+216CC+25C00+2ACA3+2F41F+33D59+382D4+44C3D

Notice the +44C3D is the lead out and track count of 13 (even though with last data track there are 14 tracks, so the track starting at 382D4 is a Data track)
Special Case 2, Example of [data][audio] CD:

Code:
    LBA FirstIndex: 1 last Index: 12
      Type: Data Track 1  LBA Address: 0  Length: 00:08:11.386
      Type: Audio Track 2  LBA Address: 36854  Length: 00:05:53.000
      Type: Audio Track 3  LBA Address: 63329  Length: 00:04:29.880
      Type: Audio Track 4  LBA Address: 83570  Length: 00:05:33.494
      Type: Audio Track 5  LBA Address: 108582  Length: 00:05:21.653
      Type: Audio Track 6  LBA Address: 132706  Length: 00:06:07.307
      Type: Audio Track 7  LBA Address: 160254  Length: 00:04:41.693
      Type: Audio Track 8  LBA Address: 181381  Length: 00:04:50.733
      Type: Audio Track 9  LBA Address: 203186  Length: 00:06:08.307
      Type: Audio Track 10  LBA Address: 230809  Length: 00:04:41.360
      Type: Audio Track 11  LBA Address: 251911  Length: 00:06:14.667
      Type: Audio Track 12  LBA Address: 280011  Length: 00:05:14.813
      Type: Lead Out  LBA Address: 303622

CDTOC=B+908C+F7F7+14708+1A8BC+206F8+27294+2C51B+31A48+3862F+3D89D+44661+4A29C+X96

Here the data track is signalled by +X96, which is 96 in Hex (the LBA start address, of 150)
Incidently this tag is exactly the same as the WM/MCID tag in .wma (as created by Windows Media Player), or the ITOC tag of a Wave LIST tag, EXCEPT for the special cases listed above.
__________________
Spoon
www.dbpoweramp.com

Last edited by Spoon; 04-03-2008 at 12:14 PM.
Spoon is offline   Reply With Quote
Old 04-03-2008, 10:12 AM   #2
EliC
dBpoweramp Guru
 
Join Date: May 2004
Posts: 850
Re: FLAC & Ogg Vorbis Storage of CDTOC

Spoon, thank you for addressing this. I certainly am no expert on this so I will simply repost Skamp's questions:

http://www.hydrogenaudio.org/forums/...owtopic=59685*blooper*

Quote:
Now, I'd like to know how we're supposed to compute FreeDB DiscIDs without a lead-out address? Without first and last track numbers, how are we supposed to compute MusicBrainz DiscIDs? How are we supposed to handle discs with a data track as track 01? Discs with negative LBAs?
Do we need some more before this is final?
EliC is offline   Reply With Quote
Old 04-03-2008, 10:17 AM   #3
EliC
dBpoweramp Guru
 
Join Date: May 2004
Posts: 850
Re: FLAC & Ogg Vorbis Storage of CDTOC

Quote:
Originally Posted by Spoon View Post

Incidently this tag is exactly the same as the WM/MCID tag in .wma (as created by Windows Media Player), or the ITOC tag of a Wave LIST tag.
Do we need an extended CD TOC (CDTOC+) to cover these extra issues. So we could have two tag fields, one that is consistent with WMP and one that includes the extra info.
EliC is offline   Reply With Quote
Old 04-03-2008, 12:17 PM   #4
Spoon
Da Man
 
Spoon's Avatar
 
Join Date: Apr 2002
Posts: 17,893
Re: FLAC & Ogg Vorbis Storage of CDTOC

This thread is about FLAC and Ogg CD TOC, existing WMA and Wave tags are not included.
__________________
Spoon
www.dbpoweramp.com
Spoon is offline   Reply With Quote
Old 04-03-2008, 12:35 PM   #5
EliC
dBpoweramp Guru
 
Join Date: May 2004
Posts: 850
Re: FLAC & Ogg Vorbis Storage of CDTOC

Quote:
Originally Posted by Spoon View Post
This thread is about FLAC and Ogg CD TOC, existing WMA and Wave tags are not included.
I know. My reference to WMP was related the FLAC specs you introduced being consistent with the current MS implementation, which I thought was one of your goals.
EliC is offline   Reply With Quote
Old 04-30-2008, 08:28 AM   #6
Porcus
dBpoweramp Guru
 
Join Date: Feb 2007
Posts: 313
Re: FLAC & Ogg Vorbis Storage of CDTOC

Are there other bits that could be considered -- like CD-Text, or Pre-Emphasis or HDCD?

(Pardon my ignorance.)
Porcus is offline   Reply With Quote
Old 04-30-2008, 10:09 AM   #7
Spoon
Da Man
 
Spoon's Avatar
 
Join Date: Apr 2002
Posts: 17,893
Re: FLAC & Ogg Vorbis Storage of CDTOC

CD Text is saved in ID Tags, HDCD should be diecoded to 24 bit on ripping, Pre-Emph should also have the de-emph applied on ripping.
__________________
Spoon
www.dbpoweramp.com
Spoon is offline   Reply With Quote
Old 05-02-2008, 10:41 AM   #8
Porcus
dBpoweramp Guru
 
Join Date: Feb 2007
Posts: 313
Re: FLAC & Ogg Vorbis Storage of CDTOC

Quote:
Originally Posted by Spoon View Post
Pre-Emph should also have the de-emph applied on ripping.
E.T.A. in dBpoweramp? ;-)
Porcus is offline   Reply With Quote
Old 05-02-2008, 03:37 PM   #9
Spoon
Da Man
 
Spoon's Avatar
 
Join Date: Apr 2002
Posts: 17,893
Re: FLAC & Ogg Vorbis Storage of CDTOC

A while (it has missed R13).
__________________
Spoon
www.dbpoweramp.com
Spoon is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 07:13 AM.