2.2-pre check-in
[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
69.B \-j [number]
70Start [number] encoder processes at once. Useful for SMP systems. Overrides
71the MAXPROCS configuration variable. Set it to "0" when using distmp3 to avoid
72local encoding processes.
73.TP
74.B \-k
75Keep the wav files after encoding.
76.TP
77.B \-l
78Use the low-diskspace algorithm. See the LOWDISK configuration variable.
79.TP
80.B \-L
81Use a local CDDB repository. See CDDBLOCALDIR variable.
82.TP
83.B -n
84Do not query CDDB database. Create and use a template. Edit the template to
85provide song names, artist(s), ...
86.TP
87.B -N
88Non interactive mode. Do not ask anything from the user. Just go ahead.
89.TP
90.B -m
91Create DOS-style playlists, modifying the resulting one by adding CRLF line
92endings. Some hardware players insist on having those to work.
93.TP
94.B \-o [filetype]
99d009fa 95Select output type. Can be "ogg", "mp3", "flac", "spx" or "mpc". Specify a
c9c2ca27 96comma-delimited list of output types to obtain all specified types. See
97the OUTPUTTYPE configuration variable.
98.TP
99.B \-p
100Pads track numbers with 0\'s.
101.TP
102.B \-r [hosts...]
103Remote encode on this comma-delimited list of machines using distmp3. See
104the REMOTEHOSTS configuration variable.
105.TP
99d009fa 106.B \-s [number]
107Start the numbering of the tracks at a given number. It only affects the
108filenames and the playlist. Internal (tag) numbering remains the same.
109.TP
c9c2ca27 110.B \-S [speed]
111Set the speed of the CD drive. Needs CDSPEED and CDSPEEDOPTS set properly
112and both the program and device must support the capability.
113.TP
114.B \-v
115Show the version and exit
116.TP
117.B \-V
118Be a bit more verbose. On slow networks the CDDB requests might give the
119sensation nothins is happening.
120.TP
121.B \-x
122Eject the CD when all tracks have been read. See the EJECTCD configuration
123variable.
124.TP
125.B \-h
126Get help information.
127.TP
128.B [tracks]
129A list of tracks you want abcde to process. If this isn't specified, abcde
130will process the entire CD. Accepts ranges of track numbers -
131"abcde 1-5 7 9" will process tracks 1, 2, 3, 4, 5, 7, and 9.
132.SH OUTPUT
133Each track is, by default, placed in a separate file named after the track
134in a subdirectory named after the artist under the current directory. Each
135file is given an extension identifying its compression format, '.ogg',
99d009fa 136\'.mp3', '.flac', '.spx', or '.mpc'.
c9c2ca27 137This can be modified using the OUTPUTFORMAT and VAOUTPUTFORMAT
138variables in your abcde.conf.
139.SH CONFIGURATION
140abcde sources two configuration files on startup - /etc/abcde.conf and
141$HOME/.abcde.conf, in that order.
142.TP
143The configuration variables have to be set as follows:
144.TP
145.B VARIABLE=value
146.TP
147Except when "value" needs to be quoted or otherwise interpreted. If other
148variables within "value" are to be expanded upon reading the configuration
149file, then double quotes should be used. If they are only supposed to be
150expanded upon use (for example OUTPUTFORMAT) then single quotes must be used.
151.TP
152All sh escaping/quoting rules apply.
153.TP
154Here is a list of options abcde recognizes:
155.TP
156.B CDDBURL
157Specifies a server to use for CDDB lookups.
158.TP
159.B OGGENCODERSYNTAX
160Specifies the style of encoder to use for the Ogg/Vorbis encoder. Valid options
161are \'oggenc\' (default for Ogg/Vorbis) and \'vorbize\'.
162This affects the default location of the binary,
163the variable to pick encoder command-line options from, and where the options
164are given.
165.TP
166.B MP3ENCODERSYNTAX
167Specifies the style of encoder to use for the MP3 encoder. Valid options are
168\'lame\' (default for MP3), \'gogo\', \'bladeenc\', \'l3enc\' and \'mp3enc\'.
169Affects the same way as explained above for Ogg/Vorbis.
170.TP
171.B FLACENCODERSYNTAX
172Specifies the style of encoder to use for the FLAC encoder. At this point only
173\'flac\' is available for FLAC encoding.
174.TP
175.B SPEEXENCODERSYNTAX
176Specifies the style of encoder to use for Speex encoder. At this point only
177\'speexenc\' is available for Ogg/Speex encoding.
178.TP
99d009fa 179.B MPPENCODERSYNTAX
180Specifies the style of encoder to use for MPP/MP+ (Musepack) encoder. At this
181point we only have \'mppenc\' available, from corecodecs.org.
182.TP
c9c2ca27 183.B NORMALIZERSYNTAX
184Specifies the style of normalizer to use. Valid options are \'default\'
185and \'normalize'\ (and both run \'normalize\'), since we only support it, ATM.
186.TP
187.B HELLOINFO
188Specifies the Hello information to send to the CDDB server. The CDDB
189protocol requires you to send a valid username and hostname each time you
190connect. The format of this is username@hostname.
191.TP
192.B CDDBLOCALDIR
193Specifies a directory where we store a local CDDB repository. The entries must
194be standard CDDB entries, with the filename being the DISCID value. Other
195CD playing and ripping programs (like Grip) store the entries under ~/.cddb
196and we can make use of those entries.
197.TP
198.B CDDBCOPYLOCAL
199Store local copies of the CDDB entries under the $CDDBLOCALDIR directory.
200.TP
201.B CDDBUSELOCAL
202Actually use the stored copies of the CDDB entries. Can be overriden using the
203"-L" flag (if is CDDBUSELOCAL in "n"). If an entry is found, we always give
204the choice of retrieving a CDDB entry from the internet.
205.TP
206.B OUTPUTDIR
207Specifies the directory to place completed tracks/playlists in.
208.TP
209.B WAVOUTPUTDIR
210Specifies the temporary directory to store .wav files in. Abcde may use up
211to 700MB of temporary space for each session (although it is rare to use
212over 100MB for a machine that can encode music as fast as it can read it).
213.TP
214.B OUTPUTFORMAT
99d009fa 215Specifies the format for completed Ogg/Vorbis, MP3, FLAC, Ogg/Speex or MPP/MP+
216(Musepack) filenames.
c9c2ca27 217Variables are included
218using standard shell syntax. Allowed variables are GENRE, ALBUMFILE, ARTISTFILE,
99d009fa 219TRACKFILE, TRACKNUM, and YEAR. Default is
c9c2ca27 220\'${ARTISTFILE}/${TRACKFILE}.${OUTPUTTYPE}\'.
221Make sure to use single quotes around this variable. TRACKNUM is
222automatically zero-padded.
223.TP
224.B OUTPUTTYPE
225Specifies the encoding format to output, as well as the default extension and
226encoder. Defaults to "ogg". Valid settings are "ogg" (Ogg/Vorbis), "mp3"
99d009fa 227(MPEG-1 Audio Layer 3), "flac" (Free Lossless Audio Codec), "spx" (Ogg/Speex)
228and "mpc" (MPP/MP+ (Musepack)). Values like "ogg,mp3" encode the tracks in
229both Ogg/Vorbis and MP3 formats.
c9c2ca27 230.P
231For each value in OUTPUTTYPE, abcde expands a different process for encoding,
232tagging and moving, so you can use the format placeholder, OUTPUT, to create
233different subdirectories to hold the different types. The variable OUTPUT will
234be 'ogg', 'mp3', 'flac' and/or 'spx', depending on the OUTPUTTYPE you define.
235For example
236.P
237OUTPUTFORMAT='${OUTPUT}/${ARTISTFILE}/${ALBUMFILE}/${TRACKNUM}._${TRACKFILE}'
238.TP
239.B VAOUTPUTFORMAT
240Just like OUTPUTFORMAT but for Various Artists discs. Default is whatever
241OUTPUTFORMAT is set to.
242.TP
243.B PATHNAMES
244The following configuration file options specify the pathnames of their
245respective utilities: LAME, GOGO, BLADEENC, L3ENC, XINGMP3ENC, MP3ENC,
246VORBIZE, OGGENC, FLAC, SPEECENC, ID3, ID3V2, CDPARANOIA, CDDA2WAV, HTTPGET,
247CDDISCID, CDDBTOOL, EJECT, NORMALIZE, DISTMP3, VORBISCOMMENT, and CDSPEED.
248.TP
249.B COMMAND-LINE OPTIONS
250If you wish to specify command-line options to any of the programs abcde
251uses, set the following configuration file options: LAMEOPTS, GOGOOPTS,
252BLADEENCOPTS, L3ENCOPTS, XINGMP3ENCOPTS, MP3ENCOPTS, VORBIZEOPTS,
253OGGENCOPTS, FLACOPTS, SPEEXOPTS, ID3OPTS, ID3V2OPTS, CDPARANOIAOPTS,
254CDDA2WAVOPTS, HTTPGETOPTS, CDDBTOOLOPTS, EJECTOPTS, DISTMP3OPTS,
255NORMALIZEOPTS, CDSPEEDOPTS, and CDSPEEDVALUE.
256.TP
257.B CDROM
258If set, it points to the CD-Rom device which has to be used for audio
259extraction. Abcde tries to guess the right device, but it may fail.
260.TP
261.B MAXPROCS
262Defines how many encoders to run at once. This makes for huge speedups
263on SMP systems. You should run one encoder per CPU at once for maximum
264efficiency, although more doesn't hurt very much. Set it "0" when using
265mp3dist to avoid getting encoding processes in the local host.
266.TP
267.B LOWDISK
268If set to y, conserves disk space by encoding tracks immediately after
269reading them. This is substantially slower than normal operation but
270requires several hundred MB less space to complete the encoding of an
271entire CD. Use only if your system is low on space and cannot encode as
272quickly as it can read.
273.TP
274.B BATCH
275If set to y, enables batch mode normalization, which preserves relative
276volume differences between tracks of an album. Also enables nogap encoding
277when using the \'lame\' encoder.
278.TP
279.B KEEPWAVS
280It defaults to no, so if you want to keep those wavs ripped from your CD,
281set it to "y". You can use the "-k" switch in the command line. The default
282behaviour with KEEPWAVS set is the keep the temporary directory and the wav
283files even you have requested the "clean" action.
284.TP
285.B PADTRACKS
286If set to "y", it adds 0's to the file numbers to complete a two-number
287holder. Usefull when encoding tracks 1-9.
288.TP
289.B PLAYLISTFORMAT
290Specifies the format for completed playlist filenames. Works like the
291OUTPUTFORMAT configuration variable. Default is
292\'${ARTISTFILE}_\-_${ALBUMFILE}.m3u\'.
293Make sure to use single quotes around this variable.
294.TP
295.B PLAYLISTDATAPREFIX
296Specifies a prefix for filenames within a playlist. Useful for http
297playlists, etc.
298.TP
99d009fa 299.B DOSPLAYLIST
300If set, the resulting playlist will have CR-LF line endings, needed by some
301hardware-based players.
302.TP
c9c2ca27 303.B COMMENT
304Specifies a comment to embed in the ID3 or Ogg comment field of each
305finished track. Can be up to 28 characters long. Supports the same
306syntax as OUTPUTFORMAT. Does not currently support ID3v2.
307.TP
308.B REMOTEHOSTS
309Specifies a comma-delimited list of systems to use for remote encoding using
310distmp3. Equivalent to -r.
311.TP
312.B mungefilename
313mungefilename() is an abcde shell function that can be overridden via
314abcde.conf. It takes CDDB data as $1 and outputs the resulting filename on
315stdout. It defaults to eating control characters, apostrophes and
316question marks, translating spaces and forward slashes to underscores, and
317translating colons to an underscore and a hyphen.
318.br
319If you modify this function, it is probably a good idea to keep the forward
320slash munging (UNIX cannot store a file with a '/' char in it) as well as
321the control character munging (NULs can't be in a filename either, and
322newlines and such in filenames are typically not desirable).
323.TP
324.B EJECTCD
325If set to "y", abcde will call eject(1) to eject the cdrom from the drive
326after all tracks have been read.
327.SH BACKEND TOOLS
328abcde requires the following backend tools to work:
329.TP
330.B *
99d009fa 331An Ogg/Vorbis, MP3, FLAC, Ogg/Speex or MPP/MP+(Musepack) encoder (oggenc, vorbize, lame, gogo, bladeenc, l3enc, mp3enc, flac, speexenc, mppenc)
c9c2ca27 332.TP
333.B *
334An audio CD reading utility (cdparanoia, cdda2wav, dagrab)
335.TP
336.B *
337cd-discid, a CDDB DiscID reading program.
338.TP
339.B *
340An HTTP retrieval program: wget, fetch (FreeBSD) or curl (Mac OS X, among others).
341.TP
342.B *
343(for MP3s) id3 or id3v2, id3 v1 and v2 tagging programs.
344.TP
345.B *
346(optional) distmp3, a client/server for distributed mp3 encoding.
347.TP
348.B *
349(optional) normalize, a WAV file volume normalizer.
350.SH "SEE ALSO"
351.BR cdparanoia (1),
352.BR cdda2wav (1),
353.BR dagrab (1),
354.BR normalize (1),
355.BR oggenc (1),
356.BR vorbize (1),
357.BR flac (1),
358.BR speexenc(1),
99d009fa 359.BR mppenc(1),
c9c2ca27 360.BR id3 (1),
361.BR wget (1),
362.BR fetch (1),
363.BR cd-discid (1),
364.BR distmp3 (1),
365.BR distmp3host (1),
366.BR curl(1)
367.SH AUTHOR
368Robert Woodcock <rcw@debian.org>
369Jesus Climent <jesus.climent@hispalinux.es>