1CUE2TOC(1) General Commands Manual CUE2TOC(1)
2
3
4
6 cue2toc - convert CUE to TOC format
7
8
10 cue2toc [-hnqv] [-o tocfile] [-w wavefile] [cuefile]
11
12
14 Cue2toc converts cuefile from CUE to TOC format and writes the result
15 to tocfile. If either cuefile or tocfile is omitted or a single dash
16 "-" cue2toc reads from standard input and writes to standard ouput
17 respectively.
18
19 CUE files are text files describing the layout of a CD-Rom and typi‐
20 cally carry the extension ".cue".
21
22 Cdrdao is a CD-burning application which has its own native TOC format
23 to describe the disc layout. Although cdrdao has direct support for
24 reading CUE files, it is currently limited to data tracks only. So
25 cue2toc's main usefulness lies in converting CUE files containing audio
26 tracks.
27
28 Output of CD-Text data can be disabled with the -n option.
29
30 CUE files often come with MP3 files but since cdrdao doesnt support
31 decoding them on the fly they probably must be decoded by other means
32 prior to writing the CD (e.g. using lame). For this reason you can
33 specify a filename with the -w option to be used for all audio tracks
34 instead of the one in the CUE file. Of course this is only really use‐
35 ful if all the tracks are based on the same file. This seems to be the
36 case quite often however.
37
38 Cue2toc normally displays warning messages for unsupported commands and
39 constructs. The -q option disables these warnings.
40
41
43 -h print a short help message
44
45
46 -n no CD-Text; disable output of CD-Text information
47
48
49 -o tocfile
50 write result to tocfile instead of standard ouput
51
52
53 -q quiet mode; do not print warnings
54
55
56 -v print version number
57
58
59 -w wavefile
60 use wavefile for all audio tracks
61
62
63
65 What follows is a description of the CUE format expected by cue2toc.
66 For information about the TOC format please consult the cdrdao(1) man‐
67 ual page.
68
69 CUE files consist of commands and their arguments which must be sepa‐
70 rated from each other by any number of whitespace characters. Space,
71 horizontal tabulator, newline and carriage return are recognized as
72 whitespace characters except inside strings surrounded by double
73 quotes, where they are part of the string. Commands are not case sensi‐
74 tive. CD-Text data can be at most 80 characters per item.
75
76 Timecode values are accepted in the forms "X:X:X", "X:X" and "X" where
77 each "X" must consist of at most two digits and may be zero padded to
78 the left. They are interpreted as "M:S:F", "S:F" and "F" respectively
79 where "M" means "minutes" and must be in the range 0 <= M <= 99, "S"
80 means "seconds" and must be in the range 0 <= S <= 59, and "F" means
81 "frames" and must be in the range 0 <= F <= 74.
82
83 CUE files are logically divided into a global section and one to 99
84 track sections. Inside these sections the following commands are
85 allowed:
86
87
88 Global Section
89 REM anything_to_newline
90 CATALOG string
91 CDTEXTFILE string
92 TITLE string
93 PERFORMER string
94 SONGWRITER string
95 FILE string BINARY|MOTOROLA|AIFF|WAVE|MP3
96
97
98
99 REM Optional. Introduces a comment. Anything from there on up to
100 and including the next newline character is ignored. Comments
101 can appear anywhere in the file but not between a command and
102 its arguments.
103
104
105 CATALOG
106 Optional. The Media Catalog Number of the disc. Must be exactly
107 13 characters.
108
109
110 CDTEXTFILE
111 Optional. Specifies an external file containing CD-Text data.
112 Ignored.
113
114
115 TITLE Optional. The CD-Text title of the disc.
116
117
118 PERFORMER
119 Optional. The CD-Text performer of the disc.
120
121
122 SONGWRITER
123 Optional. The CD-Text songwriter of the disc.
124
125
126 FILE Required. The name and type of the file to be used for all fol‐
127 lowing tracks. The string contains the name of the file fol‐
128 lowed by one of BINARY, MOTOROLA, AIFF, WAVE or MP3. As far as
129 cue2toc is concerned the type of the file is effectively
130 ignored. Nonetheless MOTOROLA, AIFF and MP3 cause printing of a
131 warning message since these file types can not be used directly
132 with cdrdao.
133
134
135 The first appearance of a TRACK command causes leaving of the global
136 section and entering the track section.
137
138
139 Track Section
140 TRACK number mode
141 REM anything_to_newline
142 FLAGS [DCP] [4CH] [PRE] [SCMS]
143 ISRC string
144 TITLE string
145 PERFORMER string
146 SONGWRITER string
147 PREGAP timecode
148 INDEX number timecode
149 POSTGAP timecode
150 FILE string BINARY|MOTOROLA|AIFF|WAVE|MP3
151
152
153
154 TRACK Required. Starts a new track definition. The number is ignored.
155 The mode must be one of AUDIO, MODE1/2048, MODE1/2352,
156 MODE2/2336 or MODE2/2352.
157
158
159 FLAGS Optional. Defines the flags for this track. Must be followed by
160 one or more of the following commands: DCP (digital copy permit‐
161 ted), 4CH (four channel audio), PRE (pre-emphasis enabled) and
162 SCMS (serial copy management system). SCMS is ignored because
163 there is no corresponding option in the TOC format.
164
165
166 ISRC Optional. The International Standard Recording Code for this
167 track. Must be exactly 12 characters long.
168
169
170 TITLE Optional. The CD-Text title of this track.
171
172
173 PERFORMER
174 Optional. The CD-Text performer of this track.
175
176
177 SONWRITER
178 Optional. The CD-Text songwriter of this track.
179
180
181 PREGAP Optional. The length of the track pregap to be filled with zero
182 data. Mutually exclusive with INDEX 0.
183
184
185 POSTGAP
186 Optional. The length of the track postgap to be filled with
187 zero data.
188
189
190 INDEX Optional. The number must be in the range 0 <= number <= 99.
191 Index number 1 specifies the start of the track. Index number 0
192 is the start of the track pregap filled with data from the file,
193 i.e. the difference between index 0 and index 1 is the length of
194 the pregap. Index 0 is mutually exclusive with PREGAP. Index
195 numbers greater than 1 specify subindexes for this track and
196 must be sequential.
197
198
199 FILE Optional in track section. The syntax is the same as described
200 above and if it appears inside a track specification it takes
201 effect on the next TRACK command.
202
203
205 The command CDTEXTFILE and the flag SCMS have no equivalent in the TOC
206 format and are ignored.
207
208 CUE files containing data tracks which specify a starting time greater
209 than zero cannot be converted by cue2toc because the TOC format does
210 not provide a way to specify a starting time at all for data tracks.
211 However if the CUE file does not contain any audio tracks you can try
212 to use the CUE file directly with cdrdao.
213
214
215
217 Suppose we have the following CUE file "uwe.froehn.cue" describing an
218 audio CD with CD-Text data:
219
220 REM Example CUE file with audio tracks
221 CATALOG 1234567890123
222 TITLE "Der Berg ruft"
223 PERFORMER "Uwe Froehn"
224 FILE "uwe.froehn.mp3" MP3
225
226 TRACK 01 AUDIO
227 TITLE "Meine Mama ist die Beste"
228 PERFORMER "Uwe Froehn"
229 SONGWRITER "Hansi Klabuster"
230 REM two seconds pregap filled with audio data
231 INDEX 00 00:00:00
232 INDEX 01 00:02:00
233 REM subindexes
234 INDEX 02 00:35:17
235 INDEX 03 01:12:44
236
237 TRACK 02 AUDIO
238 TITLE "Hoch oben im Tal"
239 SONGWRITER "Gabi Geil"
240 REM no pregap
241 INDEX 01 02:45:38
242
243 TRACK 03 AUDIO
244 REM pregap with zero data
245 PREGAP 00:4:47
246 INDEX 01 07:58:74
247 REM postgap with zero data
248 POSTGAP 00:35:00
249
250 Since cdrdao cannot decode the MP3 file on the fly this step must be
251 carried out by hand, e.g. using lame:
252
253 lame --decode uwe.froehn.mp3 uwe.froehn.wav
254
255 Although the filename appears only once in the example CUE file it gets
256 written for every track in the TOC file so you would need to edit lots
257 of occurences of the filename in the TOC file by hand. For this reason
258 you can specify a string with the -w option to be used by cue2toc as
259 the filename for all audio tracks. The command
260
261 cue2toc -w uwe.froehn.wav -o uwe.froehn.toc uwe.froehn.cue
262
263 should produce the file uwe.froehn.toc with the following content:
264
265 CATALOG "1234567890123"
266 CD_DA
267 CD_TEXT {
268 LANGUAGE_MAP {
269 0 : EN
270 }
271 LANGUAGE 0 {
272 TITLE "Der Berg ruft"
273 PERFORMER "Uwe Froehn"
274 }
275 }
276
277 TRACK AUDIO
278 CD_TEXT {
279 LANGUAGE 0 {
280 TITLE "Meine Mama ist die Beste"
281 PERFORMER "Uwe Froehn"
282 SONGWRITER "Hansi Klabuster"
283 }
284 }
285 AUDIOFILE "uwe.froehn.wav" 00:00:00 02:45:38
286 START 00:02:00
287 INDEX 00:35:17
288 INDEX 01:12:44
289
290 TRACK AUDIO
291 CD_TEXT {
292 LANGUAGE 0 {
293 TITLE "Hoch oben im Tal"
294 SONGWRITER "Gabi Geil"
295 }
296 }
297 AUDIOFILE "uwe.froehn.wav" 02:45:38 05:13:36
298
299 TRACK AUDIO
300 PREGAP 00:04:47
301 AUDIOFILE "uwe.froehn.wav" 07:58:74
302 SILENCE 00:35:00
303
304
306 cdrdao(1), lame(1)
307
308
310 Since cue2toc's definition of the CUE format is entirely based on a
311 number of different CUE files the author came across there is a very
312 high probability that it will not work correctly with all the other CUE
313 files you might encounter. If this is the case for you please send the
314 problematic CUE file along with the version number of cue2toc to <der‐
315 matsch@gmx.de>.
316
317
318
320 Matthias Czapla <dermatsch@gmx.de>
321
322
323
324 CUE2TOC(1)