With debug we dont want to have the CD ejected
[clinton/abcde.git] / abcde.1
1 .TH abcde 1
3 abcde \- Grab an entire CD and compress it to Ogg/Vorbis, MP3, FLAC, Ogg/Speex and/or MPP/MP+(Musepack) format.
5 .B abcde
6 .I [options] [tracks]
8 Ordinarily, the process of grabbing the data off a CD and encoding it, then
9 tagging or commenting it, is very involved.
10 .BR abcde
11 is designed to automate this. It will take an entire CD and convert it into
12 a compressed audio format - Ogg/Vorbis, MPEG Audio Layer III, Free Lossless
13 Audio Codec (FLAC), Ogg/Speex or MPP/MP+(Musepack). With one command, it will:
14 .TP
15 .B *
16 Do a CDDB query over the Internet to look up your CD or use a locally stored CDDB entry
17 .TP
18 .B *
19 Grab a track from your CD
20 .TP
21 .B *
22 Compress it to Ogg/Vorbis, MP3, FLAC, Ogg/Speex and/or MPP/MP+(Musepack) format
23 .TP
24 .B *
25 Comment or ID3 tag it
26 .TP
27 .B *
28 Give it an intelligible filename
29 .TP
30 .B *
31 Delete the intermediate WAV file (or save it for later use)
32 .TP
33 .B *
34 Repeat until finished
36 .TP
37 .B \-1
38 Encode the whole CD in a single file. The resulting file uses the CD title
39 for tagging. If the resulting format is a flac file with an embeded cuesheet,
40 the file can be used as a source for creating other formats.
41 .TP
42 .B \-a [actions]
43 Comma-delimited list of actions to perform. Can be one or more of:
44 cddb, read, normalize, encode, tag, move, playlist, clean. Normalize
45 and encode imply read. Tag implies cddb, read, encode. Move implies
46 cddb, read, encode, tag. Playlist implies cddb. The default is to
47 do all actions except normalize and playlist.
48 .TP
49 .B \-b
50 Enable batch mode normalization. See the BATCH configuration variable.
51 .TP
52 .B \-c [filename]
53 Specifies an additional configuration file to parse. Configuration options
54 in this file override those in /etc/abcde.conf or $HOME/.abcde.conf.
55 .TP
56 .B \-C [discid]
57 Allows you to resume a session for
58 .I discid
59 when you no longer have the CD available (abcde will automatically resume if
60 you still have the CD in the drive). You must have already finished at
61 least the "read" action during the previous session.
62 .TP
63 .B \-d [devicename | filename]
64 CD\-ROM block device that contains audio tracks to be read. Alternatively, a
65 single-track flac file with embeded cuesheet.
66 .TP
67 .B \-D
68 Capture debugging information (you'll want to redirect this \- try 'abcde \-D
69 2>logfile')
70 .TP
71 .B \-h
72 Get help information.
73 .TP
74 .B \-j [number]
75 Start [number] encoder processes at once. Useful for SMP systems. Overrides
76 the MAXPROCS configuration variable. Set it to "0" when using distmp3 to avoid
77 local encoding processes.
78 .TP
79 .B \-k
80 Keep the wav files after encoding.
81 .TP
82 .B \-l
83 Use the low-diskspace algorithm. See the LOWDISK configuration variable.
84 .TP
85 .B \-L
86 Use a local CDDB repository. See CDDBLOCALDIR variable.
87 .TP
88 .B \-n
89 Do not query CDDB database. Create and use a template. Edit the template to
90 provide song names, artist(s), ...
91 .TP
92 .B \-N
93 Non interactive mode. Do not ask anything from the user. Just go ahead.
94 .TP
95 .B \-m
96 Create DOS-style playlists, modifying the resulting one by adding CRLF line
97 endings. Some hardware players insist on having those to work.
98 .TP
99 .B \-M
100 Create a CUE file with information about the CD. Together with the possibility
101 of creating a single file (see option "\-1"), one can recreate the original CD.
102 If the cuesheet is embeded in a flac single file it can be used as source for
103 encoding other formats.
104 .TP
105 .B \-o [filetype][:filetypeoptions]
106 Select output type. Can be "vorbis" (or "ogg"), "mp3", "flac", "spx" or "mpc".
107 Specify a comma-delimited list of output types to obtain all specified types.
108 See the OUTPUTTYPE configuration variable. One can pass options to the encoder
109 for a specific filetype on the command line separating them with a colon. The
110 options must be escaped with double-quotes.
111 .TP
112 .B \-p
113 Pads track numbers with 0\'s.
114 .TP
115 .B \-r [hosts...]
116 Remote encode on this comma-delimited list of machines using distmp3. See
117 the REMOTEHOSTS configuration variable.
118 .TP
119 .B \-R
120 Add replaygain information to the id3 or tag information for play
121 normalization. Only works with Ogg/FLAC and Ogg/Vorbis.
122 .TP
123 .B \-s [fields...]
124 List, separated by comas, the fields to be shown in the CDDB parsed entries.
125 Right now it only uses "year" and "genre".
126 .TP
127 .B \-S [speed]
128 Set the speed of the CD drive. Needs CDSPEED and CDSPEEDOPTS set properly
129 and both the program and device must support the capability.
130 .TP
131 .B \-t [number]
132 Start the numbering of the tracks at a given number. It only affects the
133 filenames and the playlist. Internal (tag) numbering remains the same.
134 .TP
135 .B \-T [number]
136 Same as \-t but changes also the internal (tag) numbering. Keep in mind that
137 the default TRACK tag for MP3 is $T/$TRACKS so it is changed to simply $T.
138 .TP
139 .B \-v
140 Show the version and exit
141 .TP
142 .B \-V
143 Be a bit more verbose. On slow networks the CDDB requests might give the
144 sensation nothins is happening.
145 .TP
146 .B \-x
147 Eject the CD when all tracks have been read. See the EJECTCD configuration
148 variable.
149 .TP
150 .B \-w [comment]
151 Add a comment to the tracks ripped from the CD.
152 .TP
153 .B \-W [number]
154 Concatenate CD\'s. It uses the number provided to define a comment "CD #" and
155 to modify the numbering of the tracks, starting with "#01".
156 .TP
157 .B [tracks]
158 A list of tracks you want abcde to process. If this isn't specified, abcde
159 will process the entire CD. Accepts ranges of track numbers -
160 "abcde 1-5 7 9" will process tracks 1, 2, 3, 4, 5, 7, and 9.
162 Each track is, by default, placed in a separate file named after the track
163 in a subdirectory named after the artist under the current directory.
164 This can be modified using the OUTPUTFORMAT and VAOUTPUTFORMAT
165 variables in your abcde.conf. Each file is given an extension identifying
166 its compression format, 'vorbis' for '.ogg', '.mp3', '.flac', '.spx', or '.mpc'.
168 abcde sources two configuration files on startup - /etc/abcde.conf and
169 $HOME/.abcde.conf, in that order.
170 .TP
171 The configuration options stated on those files can ba overriden by providing
172 the appropiate flags at runtime.
173 .TP
174 The configuration variables have to be set as follows:
175 .TP
176 .B VARIABLE=value
177 Except when "value" needs to be quoted or otherwise interpreted. If other
178 variables within "value" are to be expanded upon reading the configuration
179 file, then double quotes should be used. If they are only supposed to be
180 expanded upon use (for example OUTPUTFORMAT) then single quotes must be used.
181 .TP
182 All sh escaping/quoting rules apply.
183 .TP
184 Here is a list of options abcde recognizes:
185 .TP
187 Specifies a server to use for CDDB lookups.
188 .TP
190 Specifies the Hello information to send to the CDDB server. The CDDB
191 protocol requires you to send a valid username and hostname each time you
192 connect. The format of this is username@hostname.
193 .TP
195 Specifies a directory where we store a local CDDB repository. The entries must
196 be standard CDDB entries, with the filename being the DISCID value. Other
197 CD playing and ripping programs (like Grip) store the entries under ~/.cddb
198 and we can make use of those entries.
199 .TP
201 Store local copies of the CDDB entries under the $CDDBLOCALDIR directory.
202 .TP
204 Actually use the stored copies of the CDDB entries. Can be overriden using the
205 "-L" flag (if is CDDBUSELOCAL in "n"). If an entry is found, we always give
206 the choice of retrieving a CDDB entry from the internet.
207 .TP
209 Coma-separated list of fields we want to parse during the CDDB parsing.
210 Defaults to "year,genre".
211 .TP
213 Specifies the style of encoder to use for the Ogg/Vorbis encoder. Valid options
214 are \'oggenc\' (default for Ogg/Vorbis) and \'vorbize\'.
215 This affects the default location of the binary,
216 the variable to pick encoder command-line options from, and where the options
217 are given.
218 .TP
220 Specifies the style of encoder to use for the MP3 encoder. Valid options are
221 \'lame\' (default for MP3), \'gogo\', \'bladeenc\', \'l3enc\' and \'mp3enc\'.
222 Affects the same way as explained above for Ogg/Vorbis.
223 .TP
225 Specifies the style of encoder to use for the FLAC encoder. At this point only
226 \'flac\' is available for FLAC encoding.
227 .TP
229 Specifies the style of encoder to use for Speex encoder. At this point only
230 \'speexenc\' is available for Ogg/Speex encoding.
231 .TP
233 Specifies the style of encoder to use for MPP/MP+ (Musepack) encoder. At this
234 point we only have \'mppenc\' available, from corecodecs.org.
235 .TP
237 Specifies the style of normalizer to use. Valid options are \'default\'
238 and \'normalize'\ (and both run \'normalize-audio\'), since we only support it,
239 ATM.
240 .TP
242 Specifies the style of cdrom reader to use. Valid options are \'cdparanoia\',
243 \'debug\' and \'flac\'. It is used for querying the CDROM and obtain a list of
244 valid tracks and DATA tracks. The special \'flac\' case is used to "rip" CD
245 tracks from a single-track flac file.
246 .TP
248 Specifies the syntax of the program we use to read the CD CUE sheet. Right now
249 we only support \'mkcue\', but in the future other readers might be used.
250 .TP
252 It defaults to no, so if you want to keep those wavs ripped from your CD,
253 set it to "y". You can use the "-k" switch in the command line. The default
254 behaviour with KEEPWAVS set is the keep the temporary directory and the wav
255 files even you have requested the "clean" action.
256 .TP
258 If set to "y", it adds 0's to the file numbers to complete a two-number
259 holder. Useful when encoding tracks 1-9.
260 .TP
262 Set to "n" if you want to perform automatic rips, without user intervention.
263 .TP
265 Define the values for priorities (nice values) for the different CPU-hungry
266 processes: encoding (ENCNICE), CDROM read (READNICE) and distributed encoder
267 with distmp3 (DISTMP3NICE).
268 .TP
270 The following configuration file options specify the pathnames of their
271 respective utilities: LAME, GOGO, BLADEENC, L3ENC, XINGMP3ENC, MP3ENC, VORBIZE,
275 .TP
277 If you wish to specify command-line options to any of the programs abcde
278 uses, set the following configuration file options: LAMEOPTS, GOGOOPTS,
283 .TP
285 Set the value of the CDROM speed. The default is to read the disc as fast as
286 the reading program and the system permits. The steps are defined as 150kB/s
287 (1x).
288 .TP
290 The default actions to be performed when reading a disc.
291 .TP
292 .B CDROM
293 If set, it points to the CD-Rom device which has to be used for audio
294 extraction. Abcde tries to guess the right device, but it may fail. The special
295 \'flac\' option is defined to extract tracks from a single-track flac file.
296 .TP
298 Defined as "d" when using cdparanoia with an IDE bus and as "g" when using
299 cdparanoia with the ide-scsi emulation layer.
300 .TP
302 Specifies the directory to place completed tracks/playlists in.
303 .TP
305 Specifies the temporary directory to store .wav files in. Abcde may use up
306 to 700MB of temporary space for each session (although it is rare to use
307 over 100MB for a machine that can encode music as fast as it can read it).
308 .TP
310 Specifies the encoding format to output, as well as the default extension and
311 encoder. Defaults to "vorbis". Valid settings are "vorbis" (or "ogg")
312 (Ogg/Vorbis), "mp3" (MPEG-1 Audio Layer III), "flac" (Free Lossless Audio
313 Codec), "spx" (Ogg/Speex) and "mpc" (MPP/MP+ (Musepack)). Values like
314 "vorbis,mp3" encode the tracks in both Ogg/Vorbis and MP3 formats.
315 .br
316 For each value in OUTPUTTYPE, abcde expands a different process for encoding,
317 tagging and moving, so you can use the format placeholder, OUTPUT, to create
318 different subdirectories to hold the different types. The variable OUTPUT will
319 be 'vorbis', 'mp3', 'flac', 'spx' and/or 'mpc', depending on the OUTPUTTYPE you define.
320 For example
321 .br
323 .TP
325 Specifies the format for completed Ogg/Vorbis, MP3, FLAC, Ogg/Speex or MPP/MP+
326 (Musepack) filenames.
327 Variables are included
328 using standard shell syntax. Allowed variables are GENRE, ALBUMFILE, ARTISTFILE,
329 TRACKFILE, TRACKNUM, and YEAR. Default is
331 Make sure to use single quotes around this variable. TRACKNUM is
332 automatically zero-padded, when the number of encoded tracks is higher than
333 9. When lower, you can force with '-p' in the command line.
334 .TP
336 Just like OUTPUTFORMAT but for Various Artists discs. Default is whatever
337 OUTPUTFORMAT is set to.
338 .TP
340 Defines how many encoders to run at once. This makes for huge speedups
341 on SMP systems. You should run one encoder per CPU at once for maximum
342 efficiency, although more doesn't hurt very much. Set it "0" when using
343 mp3dist to avoid getting encoding processes in the local host.
344 .TP
346 If set to y, conserves disk space by encoding tracks immediately after
347 reading them. This is substantially slower than normal operation but
348 requires several hundred MB less space to complete the encoding of an
349 entire CD. Use only if your system is low on space and cannot encode as
350 quickly as it can read.
351 .TP
352 .B BATCH
353 If set to y, enables batch mode normalization, which preserves relative
354 volume differences between tracks of an album. Also enables nogap encoding
355 when using the \'lame\' encoder.
356 .TP
358 Specifies the format for completed playlist filenames. Works like the
359 OUTPUTFORMAT configuration variable. Default is
360 \'${ARTISTFILE}_\-_${ALBUMFILE}.m3u\'.
361 Make sure to use single quotes around this variable.
362 .TP
364 Specifies a prefix for filenames within a playlist. Useful for http
365 playlists, etc.
366 .TP
368 If set, the resulting playlist will have CR-LF line endings, needed by some
369 hardware-based players.
370 .TP
372 Specifies a comment to embed in the ID3 or Ogg comment field of each
373 finished track. Can be up to 28 characters long. Supports the same
374 syntax as OUTPUTFORMAT. Does not currently support ID3v2.
375 .TP
377 Specifies a comma-delimited list of systems to use for remote encoding using
378 distmp3. Equivalent to -r.
379 .TP
380 .B mungefilename
381 mungefilename() is an abcde shell function that can be overridden via
382 abcde.conf. It takes CDDB data as $1 and outputs the resulting filename on
383 stdout. It defaults to eating control characters, apostrophes and
384 question marks, translating spaces and forward slashes to underscores, and
385 translating colons to an underscore and a hyphen.
386 .br
387 If you modify this function, it is probably a good idea to keep the forward
388 slash munging (UNIX cannot store a file with a '/' char in it) as well as
389 the control character munging (NULs can't be in a filename either, and
390 newlines and such in filenames are typically not desirable).
391 .TP
392 .B mungegenre
393 mungegenre () is a shell function used to modify the $GENRE variable. As
394 a default action, it takes $GENRE as $1 and outputs the resulting value
395 to stdout converting all UPPERCASE characters to lowercase.
396 .TP
397 .B pre_read
398 pre_read () is a shell function which is executed before the CDROM is read
399 for the first time, during abcde execution. It can be used to close the CDROM
400 tray, to set its speed (via "setcd" or via "eject", if available) and other
401 preparation actions. The default function is empty.
402 .TP
403 .B post_read
404 post_read () is a shell function which is executed after the CDROM is read
405 (and, if applies, before the CDROM is ejected). It can be used to read a TOC
406 from the CDROM, or to try to read the DATA areas from the CD (if any exist).
407 The default function is empty.
408 .TP
410 If set to "y", abcde will call eject(1) to eject the cdrom from the drive
411 after all tracks have been read. It has no effect when CDROM is set to a flac
412 file.
413 .TP
415 If set to "y", some operations which are usually now shown to the end user
416 are visible, such as CDDB queries. Useful for initial debug and if your
417 network/CDDB server is slow.
419 Possible ways one can call abcde
420 .TP
421 .B abcde
422 Will work in most systems
423 .TP
424 .B abcde -d /dev/cdrom2
425 If the CDROM you are reding from is not the standard /dev/cdrom (in GNU/Linux systems)
426 .TP
427 .B abcde -o vorbis,flac
428 Will create both Ogg/Vorbis and Ogg/FLAC files.
429 .TP
430 .B abcde -o vorbis:"-b 192"
431 Will pass "-b 192" to the Ogg/Vorbis encoder, without having to modify the
432 config file
433 .TP
434 .B abcde -W 1
435 For double+ CD settings: will create the 1st CD starting with the track number
436 101, and will add a comment "CD 1" to the tracks, the second starting with 201
437 and so on.
438 .TP
439 .B abcde \-d singletrack.flac
440 Will extract the files contained in singletrack using the embeded cuesheet.
442 abcde requires the following backend tools to work:
443 .TP
444 .B *
445 An Ogg/Vorbis, MP3, FLAC, Ogg/Speex or MPP/MP+(Musepack) encoder (oggenc, vorbize, lame, gogo, bladeenc, l3enc, mp3enc, flac, speexenc, mppenc)
446 .TP
447 .B *
448 An audio CD reading utility (cdparanoia, cdda2wav, dagrab)
449 .TP
450 .B *
451 cd-discid, a CDDB DiscID reading program.
452 .TP
453 .B *
454 An HTTP retrieval program: wget, fetch (FreeBSD) or curl (Mac OS X, among others).
455 .TP
456 .B *
457 (for MP3s) id3 or id3v2, id3 v1 and v2 tagging programs.
458 .TP
459 .B *
460 (optional) distmp3, a client/server for distributed mp3 encoding.
461 .TP
462 .B *
463 (optional) normalize, a WAV file volume normalizer.
464 .TP
465 .B *
466 (optional) mkcue, a CD cuesheet extractor.
467 .SH "SEE ALSO"
468 .BR cdparanoia (1),
469 .BR cdda2wav (1),
470 .BR dagrab (1),
471 .BR normalize-audio (1),
472 .BR oggenc (1),
473 .BR vorbize (1),
474 .BR flac (1),
475 .BR speexenc (1),
476 .BR mppenc (1),
477 .BR id3 (1),
478 .BR wget (1),
479 .BR fetch (1),
480 .BR cd-discid (1),
481 .BR distmp3 (1),
482 .BR distmp3host (1),
483 .BR curl (1)
484 .BR mkcue (1),
486 Robert Woodcock <rcw@debian.org>,
487 Jesus Climent <jesus.climent@hispalinux.es> and contributions from many others.