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.

formats.txt 8.9 KiB

20 jaren geleden
20 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
19 jaren geleden
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518
  1. ===========================================================
  2. Description of the Cue Sheet/Table of Contents File Formats
  3. ===========================================================
  4. :Author: Svend Sorensen
  5. :Contact: sorensen@users.berlios.de
  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 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``.
  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. .. [#] The cdrtools_ ``cue.c`` file also has ``file_format`` entries for ``AU``
  63. 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. PREGAP
  101. ~~~~~~
  102. :Description: Sets track pregap.
  103. :Section(s): track
  104. :Format:
  105. ``PREGAP <pregap>``
  106. ``pregap``
  107. time in MSF format.
  108. The pregap is filled with generated silence.
  109. REM
  110. ~~~
  111. :Description: Begins a comment line.
  112. :Section(s): any
  113. :Format:
  114. ``REM [comments]``
  115. TRACK
  116. ~~~~~
  117. :Description: Starts a new track.
  118. :Section(s): track
  119. :Format:
  120. ``TRACK <track_number> <track_mode>``
  121. ``track_number``
  122. a positive integer in the range 1-99.
  123. ``track_mode``
  124. one of: ``AUDIO``, ``CDG``, ``MODE1/2048``, ``MODE1/2352``,
  125. ``MODE2/2336``, ``MODE2/2352``, ``CDI/2336``, or ``CDI/2352``.
  126. (CD-TEXT keywords)
  127. ~~~~~~~~~~~~~~~~~~
  128. :Description: Sets CD-TEXT data.
  129. :Section(s): any
  130. :Format:
  131. ``<CDTEXT_keyword> <CDTEXT_field>``
  132. ``CDTEXT_keyword``
  133. one of: (see `CD-TEXT`_ section for a list of keywords).
  134. ``CDTEXT_field``
  135. a string.
  136. The cue format does not have native support for binary CD-TEXT.
  137. Table of Contents File Format
  138. =============================
  139. The standard file suffix for a toc file is ``.toc``.
  140. Certain keywords begin a block, which must be enclosed between ``{`` and ``}``
  141. brackets.
  142. Comments
  143. --------
  144. Comments begin with ``//`` and may be placed anywhere. Because they can be
  145. placed anywhere in a line, toc comments are treated as a special case (not as a
  146. keyword). Any text beginning with ``//`` is stripped from each line.
  147. Keywords
  148. --------
  149. CATALOG
  150. ~~~~~~~
  151. :Section(s): global
  152. :Format: ``CATALOG "<catalog_number>"``
  153. Sets the catalog number of the CD. ``catalog_number`` must be exactly 13
  154. digits.
  155. CD_DA
  156. ~~~~~
  157. :Section(s): global
  158. :Format: ``CD_DA``
  159. Sets the CD format to audio.
  160. CD_ROM
  161. ~~~~~~
  162. :Section(s): global
  163. :Format: ``CD_ROM``
  164. Sets the CD format to data.
  165. CD_ROM_XA
  166. ~~~~~~~~~
  167. :Section(s): global
  168. :Format: ``CD_ROM_XA``
  169. Sets the CD format to mixed.
  170. TRACK
  171. ~~~~~
  172. :Section(s): track
  173. :Format: ``TRACK <track_mode> [sub_channel_mode]``
  174. NO
  175. ~~
  176. :Section(s): track
  177. :Format: ``NO <flag>``
  178. Negates (clears) track flags. Allowable ``flag`` entries are ``COPY`` and
  179. ``PRE_EMPHASIS``.
  180. COPY
  181. ~~~~
  182. :Section(s): track
  183. :Format: ``COPY``
  184. Sets the copy permitted flag.
  185. PRE_EMPHASIS
  186. ~~~~~~~~~~~~
  187. :Section(s): track
  188. :Format: ``PRE_EMPHASIS``
  189. Sets the pre-emphasis flag.
  190. TWO_CHANNEL_AUDIO
  191. ~~~~~~~~~~~~~~~~~
  192. :Section(s): track
  193. :Format: ``TWO_CHANNEL_AUDIO``
  194. Sets the two channel audio flag.
  195. FOUR_CHANNEL_AUDIO
  196. ~~~~~~~~~~~~~~~~~~
  197. :Section(s): track
  198. :Format: ``FOUR_CHANNEL_AUDIO``
  199. Sets the four channel audio flag.
  200. ISRC
  201. ~~~~
  202. :Section(s): track
  203. :Format: ``ISRC "<ISRC_number>"``
  204. Sets track ISRC number. ``ISRC_number`` must be of the format CCOOOOYYSSSSS.
  205. SILENCE
  206. ~~~~~~~
  207. :Section(s): track
  208. *TODO*
  209. ZERO
  210. ~~~~
  211. :Section(s): track
  212. *TODO*
  213. FILE
  214. ~~~~
  215. :Section(s): track
  216. :Format: ``FILE "<filename>" <start> [length]``
  217. Add file to current track. ``start`` and ``length`` must be in MSF format.
  218. AUDIOFILE
  219. ~~~~~~~~~
  220. :Section(s): track
  221. :Format: ``AUDIOFILE "<filename>" <start> [length]``
  222. Add file to current track. ``start`` and ``length`` must be in MSF format.
  223. DATAFILE
  224. ~~~~~~~~
  225. :Section(s): track
  226. *TODO*
  227. FIFO
  228. ~~~~
  229. :Section(s): track
  230. *TODO*
  231. START
  232. ~~~~~
  233. :Section(s): track
  234. :Format: ``START <start>``
  235. *TODO*
  236. PREGAP
  237. ~~~~~~
  238. Section(s): track
  239. Format: ``PREGAP <pregap>``
  240. Sets track pregap. ``pregap`` must be in MSF format.
  241. INDEX
  242. ~~~~~
  243. :Section(s): track
  244. :Format: ``INDEX <index_number> <index_time>``
  245. Sets a track index. ``index_number`` must be a non-negative integer.
  246. ``index_time`` must be in MSF format.
  247. CD_TEXT
  248. ~~~~~~~
  249. :Section(s): any
  250. :Format: ``CD_TEXT {}``
  251. Begins a CD-TEXT block.
  252. LANGUAGE_MAP
  253. ~~~~~~~~~~~~
  254. :Section(s): global
  255. :Subsection(s): CD-TEXT block
  256. :Format: ``LANGUAGE_MAP { language_map... }``
  257. Begins a language map block. ``language_map`` is a mapping of an integer in
  258. the range 0-255 to a country code.
  259. LANGUAGE
  260. ~~~~~~~~
  261. :Section(s): track
  262. :Subsection(s): CD-TEXT block
  263. :Format: ``LANGUAGE language_number { cd_text }``
  264. Begins a language block. ``language_number`` must be an integer in the range
  265. 0-255. ``cd_text`` is a series of CD-TEXT keyword lines.
  266. (CD-TEXT keywords)
  267. ~~~~~~~~~~~~~~~~~~
  268. :Section(s): any
  269. :Subsection(s): language block
  270. :Format1: ``<CDTEXT_keyword> "<CDTEXT_field>"``
  271. :Format2: ``<CDTEXT_keyword> { CDTEXT_binary_data }``
  272. See `CD-TEXT`_ section for a list of CD-TEXT keywords. Format1 is for
  273. character data and Format2 is for binary data. ``CDTEXT_binary_data`` is a
  274. comma seperated list of integers in the range 0-255.
  275. CD-TEXT
  276. =======
  277. MMC-3_ specifies 16 CD-TEXT types. Three are reserved and have no
  278. corresponding keywords. One is shared; the keyword depends on whether it is
  279. for the disc (``UPC_EAN``) or a track (``ISRC``). CD-TEXT entries are either
  280. character or binary data. All descriptions taken from MMC-3_.
  281. Keywords
  282. --------
  283. ARRANGER
  284. ~~~~~~~~
  285. :Description: Name(s) of the arranger(s)
  286. :Section: any
  287. :Format: character
  288. COMPOSER
  289. ~~~~~~~~
  290. :Description: Name(s) of the composer(s)
  291. :Section: any
  292. :Format: character
  293. DISC_ID
  294. ~~~~~~~
  295. :Description: Disc Identification information
  296. :Section: any
  297. :Format: binary
  298. GENRE
  299. ~~~~~
  300. :Description: Genre Identification and Genre information
  301. :Section: any
  302. :Format: binary
  303. Genre codes are in the Enhanced CD Specification or cdrtools_ ``cdtext.h`` file.
  304. ISRC
  305. ~~~~~
  306. :Description: ISRC Code of each track
  307. :Section: track
  308. :Format: character
  309. MESSAGE
  310. ~~~~~~~
  311. :Description: Message from the content provider and/or artist
  312. :Section: any
  313. :Format: character
  314. PERFORMER
  315. ~~~~~~~~~
  316. :Description: Name(s) of the performer(s)
  317. :Section: any
  318. :Format: character
  319. SONGWRITER
  320. ~~~~~~~~~~
  321. :Description: Name(s) of the songwriter(s)
  322. :Section: any
  323. :Format: character
  324. TITLE
  325. ~~~~~
  326. :Description: Title of album name or Track Titles
  327. :Section: any
  328. :Format: character
  329. TOC_INFO
  330. ~~~~~~~~~
  331. :Description: Table of Content information
  332. :Section: any
  333. :Format: binary
  334. TOC_INFO2
  335. ~~~~~~~~~
  336. :Description: Second Table of Content information
  337. :Section: any
  338. :Format: binary
  339. UPC_EAN
  340. ~~~~~~~
  341. :Description: UPC/EAN code of the album
  342. :Section: disc
  343. :Format: character
  344. SIZE_INFO
  345. ~~~~~~~~~
  346. :Description: Size information of the Block
  347. :Section: any
  348. :Format: binary
  349. Definitions
  350. ===========
  351. MSF format
  352. a representation of time in the form ``m:s:f``. ``m`` is minutes,
  353. ``s`` is seconds, and ``f`` is frames. Fields may be zero padded.
  354. frame
  355. 1/75 of a second.
  356. .. _MMC-3: ftp://ftp.t10.org/t10/drafts/mmc3/
  357. .. _cdrtools: http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html