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