You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

588 lines
10 KiB

  1. ===========================================================
  2. Description of the Cue Sheet/Table of Contents File Formats
  3. ===========================================================
  4. :Author: Svend Sorensen
  5. :Contact: svend@ciffer.net
  6. :Date: $LastChangedDate$
  7. .. contents::
  8. The Cue Sheet (cue) and Table of Contents (toc) file formats both describe the
  9. layout of a CD.
  10. Notes
  11. =====
  12. A cue or toc file has an (optional) global section, followed by any number of
  13. track sections.
  14. Lines (with a few exceptions for the toc format) begin with a keyword, which
  15. may be followed by whitespace separated fields. Some keywords are only allowed
  16. in the global section or a track section.
  17. Format Notation
  18. ---------------
  19. A string may be enclosed in single or double quotation marks. If the string
  20. contains whitespace, it must be enclosed in quotation marks.
  21. ``<field>``
  22. a required field
  23. ``[field]``
  24. an optional field
  25. ``...``
  26. preceding field may be repeated any number of times
  27. Cue Sheet Format
  28. ================
  29. The standard file suffix for a cue file is ``.cue``.
  30. Keywords
  31. --------
  32. CATALOG
  33. ~~~~~~~
  34. :Description: Sets the media catalog number of the CD.
  35. :Section(s): global
  36. :Format:
  37. ``CATALOG <catalog_number>``
  38. ``catalog_number``
  39. an integer consisting of exactly 13 digits.
  40. CDTEXTFILE
  41. ~~~~~~~~~~
  42. :Description: Sets an external file for CD-TEXT data.
  43. :Section(s): global
  44. :Format:
  45. ``CDTEXTFILE <filename>``
  46. ``filename``
  47. a string.
  48. The CD-TEXT file contains encoded CD-TEXT data. The standard extension for
  49. CD-TEXT files is ``.cdt``. *TODO: describe CD-TEXT file format*
  50. FILE
  51. ~~~~
  52. :Description: Sets a new input file.
  53. :Section(s): track
  54. :Format:
  55. ``FILE <filename> [file_format]``
  56. ``filename``
  57. a string.
  58. ``file_format``
  59. one of: ``BINARY``, ``MOTOROLA``, ``AIFF``, ``WAVE``, or
  60. ``MP3`` [#]_.
  61. ``FILE`` line precedes the beginning of the track section.
  62. .. [#] ``file_fomat`` differs between software packages. The cdrtools_
  63. ``cue.c`` file also has ``file_format`` entries for ``AU`` and ``OGG``.
  64. FLAGS
  65. ~~~~~
  66. :Description: Sets track flags.
  67. :Section(s): track
  68. :Format:
  69. ``FLAGS [flag]...``
  70. ``flag``
  71. one of: ``PRE``, ``DCP``, ``4CH``, or ``SCMS``.
  72. INDEX
  73. ~~~~~
  74. :Description: Sets a track index.
  75. :Section(s): track
  76. :Format:
  77. ``INDEX <index_number> <index>``
  78. ``index_number``
  79. an integer in the range 0-99.
  80. ``index``
  81. time in MSF format.
  82. Having an ``INDEX 00`` and an ``INDEX 01`` defines a pregap using data from the
  83. ``FILE``.
  84. ISRC
  85. ~~~~
  86. :Description: Sets track ISRC number.
  87. :Section(s): track
  88. :Format:
  89. ``ISRC <ISRC_number>``
  90. ``ISRC_number``
  91. a string with the format CCOOOOYYSSSSS.
  92. POSTGAP
  93. ~~~~~~~
  94. :Description: Sets track postgap.
  95. :Section(s): track
  96. :Format:
  97. ``POSTGAP <postgap>``
  98. ``postgap``
  99. time in MSF format.
  100. Postgap is filled with generated silence.
  101. PREGAP
  102. ~~~~~~
  103. :Description: Sets track pregap.
  104. :Section(s): track
  105. :Format:
  106. ``PREGAP <pregap>``
  107. ``pregap``
  108. time in MSF format.
  109. The pregap is filled with generated silence.
  110. REM
  111. ~~~
  112. :Description: Begins a comment line.
  113. :Section(s): any
  114. :Format:
  115. ``REM [comments]``
  116. TRACK
  117. ~~~~~
  118. :Description: Starts a new track.
  119. :Section(s): track
  120. :Format:
  121. ``TRACK <track_number> <track_mode>``
  122. ``track_number``
  123. a positive integer in the range 1-99.
  124. ``track_mode``
  125. one of: ``AUDIO``, ``CDG``, ``MODE1/2048``, ``MODE1/2352``,
  126. ``MODE2/2336``, ``MODE2/2352``, ``CDI/2336``, or ``CDI/2352``.
  127. (CD-TEXT keywords)
  128. ~~~~~~~~~~~~~~~~~~
  129. :Description: Sets CD-TEXT data.
  130. :Section(s): any
  131. :Format:
  132. ``<CDTEXT_keyword> <CDTEXT_field>``
  133. ``CDTEXT_keyword``
  134. one of: (see `CD-TEXT`_ section for a list of keywords).
  135. ``CDTEXT_field``
  136. a string.
  137. The cue format does not have native support for binary CD-TEXT.
  138. Table of Contents File Format
  139. =============================
  140. The standard file suffix for a toc file is ``.toc``.
  141. Certain keywords begin a block, which must be enclosed between ``{`` and ``}``
  142. brackets.
  143. Comments
  144. --------
  145. Comments begin with ``//`` and may be placed anywhere except inside quoted
  146. strings. A comment beginning with ``//`` is stripped from each line.
  147. Keywords
  148. --------
  149. AUDIOFILE
  150. ~~~~~~~~~
  151. :Description: Add file to current track.
  152. :Section(s): track
  153. :Format:
  154. ``AUDIOFILE "<filename>" <start> [length]``
  155. ``filename``
  156. a string.
  157. ``start``
  158. time in MSF format.
  159. ``length``
  160. time in MSF format.
  161. CATALOG
  162. ~~~~~~~
  163. :Description: Sets the media catalog number of the CD.
  164. :Section(s): global
  165. :Format:
  166. ``CATALOG "<catalog_number>"``
  167. ``catalog_number``
  168. an integer consisting of exactly 13 digits.
  169. CD_DA
  170. ~~~~~
  171. :Description: Sets the CD format to audio.
  172. :Section(s): global
  173. :Format: ``CD_DA``
  174. CD_ROM
  175. ~~~~~~
  176. :Description: Sets the CD format to data.
  177. :Section(s): global
  178. :Format: ``CD_ROM``
  179. CD_ROM_XA
  180. ~~~~~~~~~
  181. :Description: Sets the CD format to mixed.
  182. :Section(s): global
  183. :Format: ``CD_ROM_XA``
  184. CD_TEXT
  185. ~~~~~~~
  186. :Section(s): any
  187. :Format: ``CD_TEXT {}``
  188. Begins a CD-TEXT block.
  189. COPY
  190. ~~~~
  191. :Description: Sets the copy permitted flag.
  192. :Section(s): track
  193. :Format: ``COPY``
  194. DATAFILE
  195. ~~~~~~~~
  196. :Description: Add data from file to current track.
  197. :Section(s): track
  198. :Format:
  199. ``DATAFILE "<filename>" [length]``
  200. ``filename``
  201. a string.
  202. ``length``
  203. time in MSF format.
  204. ISRC
  205. ~~~~
  206. :Description: Sets track ISRC number.
  207. :Section(s): track
  208. :Format:
  209. ``ISRC "<ISRC_number>"``
  210. ``ISRC_number``
  211. a string with the format CCOOOOYYSSSSS.
  212. FIFO
  213. ~~~~
  214. :Description: Add data from FIFO to current track.
  215. :Section(s): track
  216. :Format:
  217. ``FIFO "<fifoname>" <length>"``
  218. ``length``
  219. time in MSF format.
  220. FILE
  221. ~~~~
  222. :Description: Add data from file to current track.
  223. :Section(s): track
  224. :Format:
  225. ``FILE "<filename>" <start> [length]``
  226. ``filename``
  227. a string.
  228. ``start``
  229. time in MSF format.
  230. ``length``
  231. time in MSF format.
  232. FOUR_CHANNEL_AUDIO
  233. ~~~~~~~~~~~~~~~~~~
  234. :Description: Sets the four channel audio flag.
  235. :Section(s): track
  236. :Format: ``FOUR_CHANNEL_AUDIO``
  237. INDEX
  238. ~~~~~
  239. :Description: Sets a track index.
  240. :Section(s): track
  241. :Format: ``INDEX <index_number> <index_time>``
  242. ``index_number``
  243. a non-negative integer.
  244. ``index_time``
  245. time in MSF format.
  246. LANGUAGE
  247. ~~~~~~~~
  248. :Description: Begins a language block.
  249. :Section(s): track
  250. :Subsection(s): CD-TEXT block
  251. :Format:
  252. ``LANGUAGE language_number { cd_text }``
  253. ``language_number``
  254. an integer in the range 0-255.
  255. ``cd_text``
  256. a series of CD-TEXT keyword lines.
  257. LANGUAGE_MAP
  258. ~~~~~~~~~~~~
  259. :Description: Begins a language map block.
  260. :Section(s): global
  261. :Subsection(s): CD-TEXT block
  262. :Format:
  263. ``LANGUAGE_MAP { language_map... }``
  264. ``language_map``
  265. is a mapping of an integer in the range 0-255 to a country
  266. code. *TODO: add description of mapping format*
  267. NO
  268. ~~
  269. :Description: Negates (clears) track flags.
  270. :Section(s): track
  271. :Format:
  272. ``NO <flag>``
  273. ``flag``
  274. one of: ``COPY`` or ``PRE_EMPHASIS``.
  275. PREGAP
  276. ~~~~~~
  277. :Description: Sets track pregap.
  278. :Section(s): track
  279. :Format:
  280. ``PREGAP <pregap>``
  281. ``pregap``
  282. time in MSF format.
  283. SILENCE
  284. ~~~~~~~
  285. :Description: Add zero (silent) audio data to current track.
  286. :Section(s): track
  287. :Format:
  288. ``SILENCE <length>``
  289. ``length``
  290. time in MSF format.
  291. START
  292. ~~~~~
  293. :Description: Sets the length of the pregap.
  294. :Section(s): track
  295. :Format:
  296. ``START <start>``
  297. ``start``
  298. time in MSF format.
  299. TRACK
  300. ~~~~~
  301. :Description: Starts a new track.
  302. :Section(s): track
  303. :Format:
  304. ``TRACK <track_mode> [sub_channel_mode]``
  305. ``track_mode``
  306. one of: ``AUDIO``, ``MODE1``, ``MODE1_RAW``, ``MODE2``,
  307. ``MODE2_FORM1``, ``MODE2_FORM2``, ``MODE2_FORM_MIX``,
  308. ``MODE2_RAW``
  309. ``sub_channel_mode``
  310. one of: ``RW``, ``RW_RAW``
  311. TWO_CHANNEL_AUDIO
  312. ~~~~~~~~~~~~~~~~~
  313. :Description: Sets the two channel audio flag.
  314. :Section(s): track
  315. :Format: ``TWO_CHANNEL_AUDIO``
  316. ZERO
  317. ~~~~
  318. :Description: Add zero data to current track.
  319. :Section(s): track
  320. :Format:
  321. ``ZERO <length>``
  322. ``length``
  323. time in MSF format.
  324. (CD-TEXT keywords)
  325. ~~~~~~~~~~~~~~~~~~
  326. :Description: Sets CD-TEXT data.
  327. :Section(s): any
  328. :Subsection(s): language block
  329. :Format1:
  330. ``<CDTEXT_keyword> "<CDTEXT_field>"``
  331. ``CDTEXT_keyword``
  332. one of: (see `CD-TEXT`_ section for a list of keywords).
  333. ``CDTEXT_field``
  334. a string.
  335. :Format2:
  336. ``<CDTEXT_keyword> { CDTEXT_binary_data }``
  337. ``CDTEXT_binary_data``
  338. comma separated list of integers in the range 0-255.
  339. Format1 is for character data and Format2 is for binary data. See `CD-TEXT`_
  340. section for a list of CD-TEXT keywords.
  341. CD-TEXT
  342. =======
  343. MMC-3_ specifies 16 CD-TEXT types. Three are reserved and have no
  344. corresponding keywords. One is shared; the keyword depends on whether it is
  345. for the disc (``UPC_EAN``) or a track (``ISRC``). CD-TEXT entries are either
  346. character or binary data. All descriptions taken from MMC-3_.
  347. Keywords
  348. --------
  349. ARRANGER
  350. ~~~~~~~~
  351. :Description: Name(s) of the arranger(s)
  352. :Section: any
  353. :Format: character
  354. COMPOSER
  355. ~~~~~~~~
  356. :Description: Name(s) of the composer(s)
  357. :Section: any
  358. :Format: character
  359. DISC_ID
  360. ~~~~~~~
  361. :Description: Disc Identification information
  362. :Section: any
  363. :Format: binary
  364. GENRE
  365. ~~~~~
  366. :Description: Genre Identification and Genre information
  367. :Section: any
  368. :Format: binary
  369. Genre codes are in the Enhanced CD Specification or cdrtools_ ``cdtext.h`` file.
  370. ISRC
  371. ~~~~~
  372. :Description: ISRC Code of each track
  373. :Section: track
  374. :Format: character
  375. MESSAGE
  376. ~~~~~~~
  377. :Description: Message from the content provider and/or artist
  378. :Section: any
  379. :Format: character
  380. PERFORMER
  381. ~~~~~~~~~
  382. :Description: Name(s) of the performer(s)
  383. :Section: any
  384. :Format: character
  385. SONGWRITER
  386. ~~~~~~~~~~
  387. :Description: Name(s) of the songwriter(s)
  388. :Section: any
  389. :Format: character
  390. TITLE
  391. ~~~~~
  392. :Description: Title of album name or Track Titles
  393. :Section: any
  394. :Format: character
  395. TOC_INFO
  396. ~~~~~~~~~
  397. :Description: Table of Content information
  398. :Section: any
  399. :Format: binary
  400. TOC_INFO2
  401. ~~~~~~~~~
  402. :Description: Second Table of Content information
  403. :Section: any
  404. :Format: binary
  405. UPC_EAN
  406. ~~~~~~~
  407. :Description: UPC/EAN code of the album
  408. :Section: disc
  409. :Format: character
  410. SIZE_INFO
  411. ~~~~~~~~~
  412. :Description: Size information of the Block
  413. :Section: any
  414. :Format: binary
  415. Definitions
  416. ===========
  417. frame
  418. 1/75 of a second.
  419. International Standard Recording Code (ISRC)
  420. A 12 character identification code for sound recordings. See
  421. `ISRC intro`_ for details.
  422. Media Catalog Number (MCN)
  423. A 13 digit UPC/EAN code for the disc.
  424. MSF format
  425. a representation of time in the form ``m:s:f``. ``m`` is minutes,
  426. ``s`` is seconds, and ``f`` is frames. Fields may be zero padded.
  427. .. _MMC-3: ftp://ftp.t10.org/t10/drafts/mmc3/
  428. .. _cdrtools: http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html
  429. .. _ISRC intro: http://www.ifpi.org/site-content/online/isrc_intro.html