NAME

cdrip - extract tracks from an audio CD and encode as Ogg, MP3 and/or FLAC


SYNOPSIS

cdrip [-q qual] [-b bps] [-d device] [-e enclist] [-l lock] [-j jobs] [-K]


DESCRIPTION

cdrip is a script to extract and encode audio CDs. Normally it is sufficient to cd to your audio archive directory, insert your audio CD in the CDROM drive and say:

        cdrip

cdrip will consult the FreeDB database for track and album titles, and extract and encode the tracks.

Note: cdrip is a wrapper. See the PREREQUISITES section below for needed software.


OPTIONS

-A

Anonymous. Do not expect or obtain a table of contents for this disc.

-b kbps

Fixed bitrate kilobits per second for the encoding. Default: variable bit rate using quality (-q below).

-d device

The device from which to read the audio CD. Default: /dev/cdrom or the value of $CDRIP_DEV.

-D dir

Change working directory to dir before ripping. Default: . or the value of $CDRIP_DIR.

-e encodings

Comma separated list of encoding formats to produce. Supported: ogg, mp3, flac. Default: ogg, or the value of $CDRIP_ENC.

-j jobs

Run jobs encoders at once. This implies use of a set of locks. Useful on multi-CPU machines.

-K

Keep the WAV files of the raw audio from the CD around after encoding.

-l lock

Base name of the lock to use for asynchronous background decoding. You can use this if you can pull the audio data from the CD faster than your machine can encode the data to the desired format (eg a fast CDROM in a slow machine). This will background every encoder, each of which will obtain the named lock with the lock(1cs) command before running, thus not thrashing your machine to death. Use of this option may allow you to queue up many CDs by pulling the data in ahead of completion of the encoding. Default: synchronous encoding - the encoding will still run in parallel with pulling data from the CD, but encoding of each track will still wait for the previous encoding to finish, and ripping of the track after will in turn be delayed under encoding of this track can be dispatched.

-q quality

Variable bitrate quality level. Default: 6 or the value of $CDRIP_QUAL. Note: this is the oggenc(1) quality numbering (1 is bad, 9 is good). Lame(1)'s quality numbering goes the other way. The script converts as appropriate, but this should be bourne in mind if encoding to MP3. Flac(1) encoding uses this to control the compression level.

-v

Verbose. Make rippers more noisy.

-x

Trace execution.


PREREQUISITES

cdrip is a wrapper for the extraction and encoding programs, which must also be installed. You need:

cdparanoia

The program used to pull the audio data from the CD, available here:

        http://freshmeat.net/projects/cdparanoia/?topic_id=118%2C113
oggenc

The program used to encode CD audio to Ogg Vorbis files, available here:

        http://freshmeat.net/projects/oggenc/?topic_id=113
lame

The program used to encode CD audio to MP3 files, available here:

        http://freshmeat.net/projects/lame/?topic_id=113%2C123
css

cdrip uses a bunch of utility scripts from this (lock, rmafter, etc). Fortunately, cdrip itself is part of this collection so the easiest thing is just to grab it and put its bin directory at the end of your $PATH. It is available here:

        http://freshmeat.net/projects/css-cameronsimpsonsscripts/?topic_id=45%2C137%2C253%2C861


ENVIRONMENT

EDITOR, the program used to edit the table of contents if desired. Default: vi.

NAME, your name. Noted as the ripper if not empty.

CDRIP_OPTS, a list of default options to prepend to the command line options to specify default behaviour. Alternatively the separate environment variables below may be used. Options specified in CDRIP_OPTS will override the defaults below if both are used.

CDRIP_DEV, the device from which to read the audio CD. Default: /dev/cdrom.

CDRIP_ENC, a comma separated list of encoding formats to produce. Default: ogg. Known: ogg and mp3.

CDRIP_LOCK, the base name for the lock to use between encoders.

CDRIP_QUAL, the default quality to aim for. Default: 6.

CDRIP_BPS, the default fixed bitrate to aim for. Default: 192.

Note that quality and bits-per-second interact. If specified on the command line, the later of -b and -q is used. If you're using the environment variables, a non-empty CDRIP_QUAL will always win over CDRIP_BPS. Command line options win over environment variables. The best way to get a fixed rate encoding from the environment variables is to use CDRIP_OPTS to specify a -b option.

CDDBSERVER, in the form server:port, used by cdtoc(1cs) to obtain album and track information.

CDRIP_TRACKFMT, printf(1) format string expecting a %d and a %s in that order, being the track number and name. Default: %02d - %s


SEE ALSO

oggenc(1), lame(1), flac(1), cdparanoia(1), mkiso(1cs), mkcd(1cs), cdtoc(1cs), cdsubmit(1cs)


AUTHOR

Cameron Simpson <cs@zip.com.au> 12mar2001