Added missing ;;
[clinton/abcde.git] / abcde.1
CommitLineData
c9c2ca27 1.TH ABCDE 1
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
24f444d7 97.B \-o [filetype][:filetypeoptions]
99d009fa 98Select output type. Can be "ogg", "mp3", "flac", "spx" or "mpc". Specify a
c9c2ca27 99comma-delimited list of output types to obtain all specified types. See
24f444d7 100the OUTPUTTYPE configuration variable. One can pass options to the encoder for
101a specific filetype on the command line separating them with a colon. The
102options must be escaped with double-quotes.
c9c2ca27 103.TP
104.B \-p
105Pads track numbers with 0\'s.
106.TP
107.B \-r [hosts...]
108Remote encode on this comma-delimited list of machines using distmp3. See
109the REMOTEHOSTS configuration variable.
110.TP
81bc6204 111.B \-R
112Add replaygain information to the id3 or tag information for play
113normalization. Only works with MP3 and Ogg/Vorbis.
114.TP
99d009fa 115.B \-s [number]
79e3928b 116[DEPRECATED: use -t, see below]
99d009fa 117.TP
c9c2ca27 118.B \-S [speed]
119Set the speed of the CD drive. Needs CDSPEED and CDSPEEDOPTS set properly
120and both the program and device must support the capability.
121.TP
79e3928b 122.B \-t [number]
123Start the numbering of the tracks at a given number. It only affects the
124filenames and the playlist. Internal (tag) numbering remains the same.
125.TP
126.B \-T [number]
127Same as \-t but changes also the internal (tag) numbering. Keep in mind that
128the default TRACK tag for MP3 is $T/$TRACKS so it is changed to simply $T.
129.TP
c9c2ca27 130.B \-v
131Show the version and exit
132.TP
133.B \-V
134Be a bit more verbose. On slow networks the CDDB requests might give the
135sensation nothins is happening.
136.TP
137.B \-x
138Eject the CD when all tracks have been read. See the EJECTCD configuration
139variable.
140.TP
81bc6204 141.B \-w [comment]
142Add a comment to the tracks ripped from the CD.
143.TP
144.B \-W [number]
145Concatenate CD\'s. It uses the number provided to define a comment "CD #" and
146to modify the numbering of the tracks, starting with "#01".
c9c2ca27 147.TP
148.B [tracks]
149A list of tracks you want abcde to process. If this isn't specified, abcde
150will process the entire CD. Accepts ranges of track numbers -
151"abcde 1-5 7 9" will process tracks 1, 2, 3, 4, 5, 7, and 9.
152.SH OUTPUT
153Each track is, by default, placed in a separate file named after the track
9f659ada 154in a subdirectory named after the artist under the current directory.
c9c2ca27 155This can be modified using the OUTPUTFORMAT and VAOUTPUTFORMAT
9f659ada 156variables in your abcde.conf. Each file is given an extension identifying
157its compression format, '.ogg', '.mp3', '.flac', '.spx', or '.mpc'.
c9c2ca27 158.SH CONFIGURATION
159abcde sources two configuration files on startup - /etc/abcde.conf and
160$HOME/.abcde.conf, in that order.
161.TP
162The configuration variables have to be set as follows:
163.TP
164.B VARIABLE=value
c9c2ca27 165Except when "value" needs to be quoted or otherwise interpreted. If other
166variables within "value" are to be expanded upon reading the configuration
167file, then double quotes should be used. If they are only supposed to be
168expanded upon use (for example OUTPUTFORMAT) then single quotes must be used.
169.TP
170All sh escaping/quoting rules apply.
171.TP
172Here is a list of options abcde recognizes:
173.TP
174.B CDDBURL
175Specifies a server to use for CDDB lookups.
176.TP
81bc6204 177.B HELLOINFO
178Specifies the Hello information to send to the CDDB server. The CDDB
179protocol requires you to send a valid username and hostname each time you
180connect. The format of this is username@hostname.
181.TP
182.B CDDBLOCALDIR
183Specifies a directory where we store a local CDDB repository. The entries must
184be standard CDDB entries, with the filename being the DISCID value. Other
185CD playing and ripping programs (like Grip) store the entries under ~/.cddb
186and we can make use of those entries.
187.TP
188.B CDDBCOPYLOCAL
189Store local copies of the CDDB entries under the $CDDBLOCALDIR directory.
190.TP
191.B CDDBUSELOCAL
192Actually use the stored copies of the CDDB entries. Can be overriden using the
193"-L" flag (if is CDDBUSELOCAL in "n"). If an entry is found, we always give
194the choice of retrieving a CDDB entry from the internet.
195.TP
c9c2ca27 196.B OGGENCODERSYNTAX
197Specifies the style of encoder to use for the Ogg/Vorbis encoder. Valid options
198are \'oggenc\' (default for Ogg/Vorbis) and \'vorbize\'.
199This affects the default location of the binary,
200the variable to pick encoder command-line options from, and where the options
201are given.
202.TP
203.B MP3ENCODERSYNTAX
204Specifies the style of encoder to use for the MP3 encoder. Valid options are
205\'lame\' (default for MP3), \'gogo\', \'bladeenc\', \'l3enc\' and \'mp3enc\'.
206Affects the same way as explained above for Ogg/Vorbis.
207.TP
208.B FLACENCODERSYNTAX
209Specifies the style of encoder to use for the FLAC encoder. At this point only
210\'flac\' is available for FLAC encoding.
211.TP
212.B SPEEXENCODERSYNTAX
213Specifies the style of encoder to use for Speex encoder. At this point only
214\'speexenc\' is available for Ogg/Speex encoding.
215.TP
99d009fa 216.B MPPENCODERSYNTAX
217Specifies the style of encoder to use for MPP/MP+ (Musepack) encoder. At this
218point we only have \'mppenc\' available, from corecodecs.org.
219.TP
c9c2ca27 220.B NORMALIZERSYNTAX
221Specifies the style of normalizer to use. Valid options are \'default\'
81bc6204 222and \'normalize'\ (and both run \'normalize-audio\'), since we only support it,
223ATM.
c9c2ca27 224.TP
81bc6204 225.B CDROMREADERSYNTAX
226Specifies the style of cdrom reader to use. Valid options are \'cdparanoia\'
227and \'debug\'. It is used for querying the CDROM and obtain a list of valid
228tracks and DATA tracks. Right now, only cdparanoia is supported.
c9c2ca27 229.TP
81bc6204 230.B KEEPWAVS
231It defaults to no, so if you want to keep those wavs ripped from your CD,
232set it to "y". You can use the "-k" switch in the command line. The default
233behaviour with KEEPWAVS set is the keep the temporary directory and the wav
234files even you have requested the "clean" action.
c9c2ca27 235.TP
81bc6204 236.B PADTRACKS
237If set to "y", it adds 0's to the file numbers to complete a two-number
238holder. Usefull when encoding tracks 1-9.
c9c2ca27 239.TP
81bc6204 240.B INTERACTIVE
241Set to "n" if you want to perform automatic rips, without user intervention.
242.TP
243.B NICE VALUES
244Define the values for priorities (nice values) for the different CPU-hungry
245processes: encoding (ENCNICE), CDROM read (READNICE) and distributed encoder
246with distmp3 (DISTMP3NICE).
247.TP
248.B PATHNAMES
249The following configuration file options specify the pathnames of their
250respective utilities: LAME, GOGO, BLADEENC, L3ENC, XINGMP3ENC, MP3ENC, VORBIZE,
251OGGENC, FLAC, SPEEXENC, MPPENC, ID3, ID3V2, CDPARANOIA, CDDA2WAV, CDDAFS,
252CDDISCID, CDDBTOOL, EJECT, MD5SUM, DISTMP3, VORBISCOMMENT, NORMALIZE, CDSPEED
253and HTTPGET.
254.TP
255.B COMMAND-LINE OPTIONS
256If you wish to specify command-line options to any of the programs abcde
257uses, set the following configuration file options: LAMEOPTS, GOGOOPTS,
258BLADEENCOPTS, L3ENCOPTS, XINGMP3ENCOPTS, MP3ENCOPTS, VORBIZEOPTS, OGGENCOPTS,
259FLACOPTS, SPEEXENCOPTS, MPPENCOPTS, ID3OPTS, ID3V2OPTS, CDPARANOIAOPTS,
260CDDA2WAVOPTS, CDDAFSOPTS, CDDBTOOLOPTS, EJECTOPTS, DISTMP3OPTS, NORMALIZEOPTS,
261CDSPEEDOPTS and HTTPGETOPTS.
262.TP
263.B CDSPEEDVALUE
264Set the value of the CDROM speed. The default is to read the disc as fast as
265the reading program and the system permits. The steps are defined as 150kB/s
266(1x).
267.TP
268.B ACTIONS
269The default actions to be performed when reading a disc.
270.TP
271.B CDROM
272If set, it points to the CD-Rom device which has to be used for audio
273extraction. Abcde tries to guess the right device, but it may fail.
c9c2ca27 274.TP
275.B OUTPUTDIR
276Specifies the directory to place completed tracks/playlists in.
277.TP
278.B WAVOUTPUTDIR
279Specifies the temporary directory to store .wav files in. Abcde may use up
280to 700MB of temporary space for each session (although it is rare to use
281over 100MB for a machine that can encode music as fast as it can read it).
282.TP
c9c2ca27 283.B OUTPUTTYPE
284Specifies the encoding format to output, as well as the default extension and
285encoder. Defaults to "ogg". Valid settings are "ogg" (Ogg/Vorbis), "mp3"
9f659ada 286(MPEG-1 Audio Layer III), "flac" (Free Lossless Audio Codec), "spx" (Ogg/Speex)
99d009fa 287and "mpc" (MPP/MP+ (Musepack)). Values like "ogg,mp3" encode the tracks in
288both Ogg/Vorbis and MP3 formats.
81bc6204 289.br
c9c2ca27 290For each value in OUTPUTTYPE, abcde expands a different process for encoding,
291tagging and moving, so you can use the format placeholder, OUTPUT, to create
292different subdirectories to hold the different types. The variable OUTPUT will
9f659ada 293be 'ogg', 'mp3', 'flac', 'spx' and/or 'mpc', depending on the OUTPUTTYPE you define.
c9c2ca27 294For example
81bc6204 295.br
c9c2ca27 296OUTPUTFORMAT='${OUTPUT}/${ARTISTFILE}/${ALBUMFILE}/${TRACKNUM}._${TRACKFILE}'
297.TP
81bc6204 298.B OUTPUTFORMAT
299Specifies the format for completed Ogg/Vorbis, MP3, FLAC, Ogg/Speex or MPP/MP+
300(Musepack) filenames.
301Variables are included
302using standard shell syntax. Allowed variables are GENRE, ALBUMFILE, ARTISTFILE,
303TRACKFILE, TRACKNUM, and YEAR. Default is
304\'${ARTISTFILE}-${ALBUMFILE}/${TRACKNUM}-${TRACKFILE}\'.
305Make sure to use single quotes around this variable. TRACKNUM is
306automatically zero-padded, when the number of encoded tracks is higher than
3079. When lower, you can force with '-p' in the command line.
308.TP
c9c2ca27 309.B VAOUTPUTFORMAT
310Just like OUTPUTFORMAT but for Various Artists discs. Default is whatever
311OUTPUTFORMAT is set to.
312.TP
c9c2ca27 313.B MAXPROCS
314Defines how many encoders to run at once. This makes for huge speedups
315on SMP systems. You should run one encoder per CPU at once for maximum
316efficiency, although more doesn't hurt very much. Set it "0" when using
317mp3dist to avoid getting encoding processes in the local host.
318.TP
319.B LOWDISK
320If set to y, conserves disk space by encoding tracks immediately after
321reading them. This is substantially slower than normal operation but
322requires several hundred MB less space to complete the encoding of an
323entire CD. Use only if your system is low on space and cannot encode as
324quickly as it can read.
325.TP
326.B BATCH
327If set to y, enables batch mode normalization, which preserves relative
328volume differences between tracks of an album. Also enables nogap encoding
329when using the \'lame\' encoder.
330.TP
c9c2ca27 331.B PLAYLISTFORMAT
332Specifies the format for completed playlist filenames. Works like the
333OUTPUTFORMAT configuration variable. Default is
334\'${ARTISTFILE}_\-_${ALBUMFILE}.m3u\'.
335Make sure to use single quotes around this variable.
336.TP
337.B PLAYLISTDATAPREFIX
338Specifies a prefix for filenames within a playlist. Useful for http
339playlists, etc.
340.TP
99d009fa 341.B DOSPLAYLIST
342If set, the resulting playlist will have CR-LF line endings, needed by some
343hardware-based players.
344.TP
c9c2ca27 345.B COMMENT
346Specifies a comment to embed in the ID3 or Ogg comment field of each
347finished track. Can be up to 28 characters long. Supports the same
348syntax as OUTPUTFORMAT. Does not currently support ID3v2.
349.TP
350.B REMOTEHOSTS
351Specifies a comma-delimited list of systems to use for remote encoding using
352distmp3. Equivalent to -r.
353.TP
354.B mungefilename
355mungefilename() is an abcde shell function that can be overridden via
356abcde.conf. It takes CDDB data as $1 and outputs the resulting filename on
357stdout. It defaults to eating control characters, apostrophes and
358question marks, translating spaces and forward slashes to underscores, and
359translating colons to an underscore and a hyphen.
360.br
361If you modify this function, it is probably a good idea to keep the forward
362slash munging (UNIX cannot store a file with a '/' char in it) as well as
363the control character munging (NULs can't be in a filename either, and
364newlines and such in filenames are typically not desirable).
365.TP
7acef70b 366.B mungegenre
367mungegenre () is a shell function used to modify the $GENRE variable. As
368a default action, it takes $GENRE as $1 and outputs the resulting value
369to stdout converting all UPPERCASE characters to lowercase.
370.TP
371.B pre_read
372pre_read () is a shell function which is executed before the CDROM is read
373for the first time, during abcde execution. It can be used to close the CDROM
374tray, to set its speed (via "setcd" or via "eject", if available) and other
375preparation actions. The default function is empty.
376.TP
c9c2ca27 377.B EJECTCD
378If set to "y", abcde will call eject(1) to eject the cdrom from the drive
379after all tracks have been read.
79e3928b 380.TP
381.B EXTRAVERBOSE
382If set to "y", some operations which are usually now shown to the end user
383are visible, such as CDDB queries. Usefull for initial debug and if your
384network/CDDB server is slow.
24f444d7 385.SH EXAMPLES
386