CDGRAB(1)

NAME
cdgrab - Grab an entire CD and compress it to MP3 format.

SYNOPSIS
cdgrab [options] [tracks]

DESCRIPTION
Ordinarily, the process of grabbing the data off a CD and encoding it, then tagging it with ID3 information, is a very involved process. cdgrab is designed to automate this. It will take an entire CD and convert it into a compressed MPEG Audio Layer III format. With one command, it will:

*   Do a CDDB query over the Internet to look up your CD

*   Grab a track from your CD

*   Compress it to MP3 format

*   ID3 tag it

*   Delete the intermediate WAV file

*   Repeat until finished

OPTIONS

-d [devicename]
    CD-ROM block device that contains music to be grabbed.

-e  Edit retrieved CDDB data before using it.

-j [number]
    Start [number] encoder processes at once. Useful for SMP systems. Overrides the MAXPROCS config file setting.

-l [number]
    Specify low-diskspace algorithm. See the LOWDISK configuration variable.

-p  Generate an m3u playlist. See the PLAYLIST configuration variable.

-P  Only generate an m3u playlist. Does no ripping or encoding. See the PLAYLISTONLY environment variable.

-h  Get help information.

[tracks]
    A list of tracks you want cdgrab to process. If this isn't specified, cdgrab will process the entire CD. Note that this does not accept wildcards, if you want tracks 2 through 5 you should say "cdgrab 2 3 4 5" not "cdgrab 2-5".

OUTPUT
Each track is placed in a separate file in a subdirectory under the current directory named after the artist. Each filename is based on the track title name, and is given an extension of '.mp3'. This can be modified using the OUTPUTFORMAT variable in your cdgrab.conf.

CONFIGURATION
cdgrab sources two configuration files on startup - /etc/cdgrab.conf and $HOME/.cdgrab.conf, in that order. Here is a list of options cdgrab will use:

CDDBURL
    Specifies a server to use for CDDB lookups.

ENCODERSYNTAX
    Specifies the encoder to use. Any encoder that accepts input and output filenames on the commandline will work. This includes BladeEnc as well as l3enc.

HELLOINFO
    Specifies the Hello information to send to the CDDB server. The CDDB protocol requires you to send a valid username and hostname each time you connect.

OUTPUTDIR
    Specifies the directory to place completed mp3's in.

WAVOUTPUTDIR
    Specifies the directory to store .wav files in temporarily.

OUTPUTFORMAT
    Specifies the format for completed MP3 filenames. Variables are included using standard shell syntax. Allowed variables are ALBUMFILE, ARTISTFILE, TRACKFILE, and TRACKNUM. Default is '${ARTISTFILE}/${TRACKFILE}.mp3'. Make sure to use single quotes around this variable. TRACKNUM is automatically zero-padded.

PATHNAMES
    The following configuration file options specify the pathnames of their respective utilities: LAME, BLADEENC, L3ENC, ID3, CDPARANOIA, CDDA2WAV, WGET, and CDDISCID.

COMMAND-LINE OPTIONS
    If you wish to specify command-line options to any of the programs cdgrab uses, set the following configuration file options: LAMEOPTS, BLADEENCOPTS, L3ENCOPTS, ID3OPTS, CDPARANOIAOPTS, CDDA2WAVOPTS, and WGETOPTS.

MAXPROCS
    Defines how many encoders to run at once. This makes for huge speedups on SMP systems. You should run one encoder per CPU at once for maximum efficiency, although more doesn't hurt very much.

LOWDISK
    Defines which low-diskspace algorithm to use:
    1. Normal Parallelization (Tracks are ripped all at once, with encoding in the background)
    2. Disk Conservation (Tracks are encoded immediately after they are ripped) This is substantially slower than #1 but requires several hundred MB less space to complete the encoding of an entire CD. Use when necessary.

PLAYLIST
    Creates an m3u-format (one filename per line) playlist file for each track ripped, in order. This lets you play back a CD just like the original.

PLAYLISTONLY
    Only creates an m3u file. Does no ripping or encoding. Useful for creating playlists for CDs you have already ripped.

PLAYLISTFORMAT
    Specifies the format for completed playlist filenames. Works like the OUTPUTFORMAT configuration variable. Default is '${ARTISTFILE}_-_${ALBUMFILE}.m3u'. Make sure to use single quotes around this variable.

BACKEND TOOLS
cdgrab requires the following backend tools to work:

*   An MP3 Encoder (lame, gogo, bladeenc, l3enc)

*   An audio CD reading utility (cdparanoia, cdda2wav)

*   cd-discid, a CDDB DiscID reading program.

*   wget, an HTTP retrieval program.

*   id3, an id3 tagging program.

AUTHOR
Robert Woodcock <rcw@debian.org>