LinuxDevCenter.com
oreilly.comSafari Books Online.Conferences.

advertisement


Linux in a Nutshell

This directory of Linux commands is from Linux in a Nutshell, 5th Edition.

Click on any of the 687 commands below to get a description and list of available options. All links in the command summaries point to the online version of the book on Safari Bookshelf.

Buy it now, or read it online on Safari Bookshelf.



cdda2wav

cdda2wav [options] [output.wav]

Convert Compact Disc Digital Audio (CDDA) to the WAV format. This process is often called "ripping" a CD-ROM and is generally performed before using an encoder to convert the file to a compressed music format, such as OGG or MP3.

Options

Some of the following options use sectors as a unit of measurement. Each sector of data on a CD represents approximately 1/75 second of play time.

-A, --auxdevice drivename

Specify a different drive for ioctl purposes.

-a, --divider n

Set the sample rate to a value equal to 44100/n samples per second. The -R option, used by itself, lists the possible values.

-B,--bulk

Copy each track into its own file. This is the single most commonly used flag.

-b, --bits-per-sample n

Set the quality of samples to n bits per sample per channel. Possible values are 8, 12, and 16.

-C byteorder, --cdrom-endianness byteorder

Set the byte order, or "endianness" of the input data. You may set the order to little, big, or guess. This is useful when your CD-ROM drive uses an unexpected or unusual byte order for your platform.

-c channel, --channels channel

Set stereo instructions. Set channel to 1 for mono; 2 for stereo; or s for stereo, but swapped left-to-right. You can also use -s (--stereo) to record in stereo and -m (--mono) to record in mono.

--cddbp-server=servername

Set the name of the CD lookup server used. A reliable choice is freedb.freedb.org, which assigns requests to one of several official mirrors for the free CD database project.

--cddbp-port=portnumber

Select the port on which to access the CD lookup server. The servers at freedb.org use cddbp on port 8880, and http on port 80.

-D, --device devicename

Specify the device. The device must work with the -i (--interface) settings.

-d, --duration

Set to a number followed by f for frames (sectors) or s for seconds. Set time to zero to record an entire track. For example, to copy two minutes, enter 120s.

-E byteorder,--output-endianness byteorder

Set the byte order or "endianness" of the output data. As with -C, you may set the order to little, big, or guess.

-e, --echo device

Send output to an audio output device instead of to a file.

-g, --gui

Format all text output for easy parsing by GUI frontends.

-H, --no-infofile

Do not copy any info or CDDB files, only the audio files.

-I, --interface ifname

Specify the type of interface. For Linux systems, the most appropriate value is usually cooked_ioctl.

-i, --index n

Set the start index to n when recording.

-J, --info-only

Use this option by itself to display information about the disc, but do nothing else.

-L n --cddb-mode n

cdda2wav automatically looks up CD information online, if possible. This option determines what happens when there are multiple entries identifying the CD. If the mode is 0, the user is prompted to select an entry. If the mode is 1, the application will use the first entry returned.

-M n, --md5 n

Create MD5 checksums for the first n bytes of each track copied.

-N, --no-write

For debugging purposes, this option suppresses writing an output file.

-n, --sectors-per-request n

Read n sectors in each request.

-O, --output-format=format

Choose the output file format. Normal file options are wav, aiff, aifc, au, and sun. You can also use cdr and raw for headerless files dumped into recording devices.

-o, --offset n

Start recording n sectors before the beginning of the first track.

-P, --set-overlap n

Use n sectors of overlap for jitter correction. Very fast systems with absolutely perfect drives and unscratched CDs can set this to 0.

-p, --set-pitch n

Adjust the pitch by n percent when copying data to an audio device.

--paranoia

Read and interpret the CD using the paranoia library instead of the cdda2wav code. Paranoia provides more sound correction routines; see cdparanoia for more information.

-q, --quiet

Quiet mode; the program will not send any data to the screen.

-R, --dump-rates

Output a list of possible sample rates and dividers. This option is typically used with no other option flags or arguments.

-r,--rate n

Set the sample rate in samples per second. To get a list of possible values, use the -R option by itself.

-S, --speed n

Specify the speed at which your system will read the CD-ROM. Set the value to the multiple of normal playback speed given as your CD-ROM drive speed (4, 16, 32, and so forth). Setting the speed lower than the maximum can prevent errors in some cases.

-t, --track n

Set start track to n. Optionally, use + and a second track number for the end track: 1+10 copies tracks one through ten.

-v, --verbose-level comma,separated,list

Determines what sort of information about the CD is displayed. The options, which should be provided as a comma separated list, are as follows: for no information, use disable; or for all information, use all. Alternatively, use toc for the table of contents, summary for the disc summary, indices for disc indices, catalog for the disc catalog, trackid for track IDs, sectors for sectors, and titles for title information, if available.

--version

Display version and quit.

-w, --wait

Wait for a signal before recording anything.

-x, --max

Set recording quality (and amount of hard disk usage) to maximum.

Examples

For most systems, you should be able to copy a complete CD to a single WAV file with the following command:

cdda2wav

To copy a complete CD to a set of WAV files, one per track:

cdda2wav -B

After using cdda2wav, you will probably want to use an encoder to compress and convert the files to a more usable format, such as MP3 or Ogg Vorbis.


Linux Resources
  • Linux Online
  • The Linux FAQ
  • linux.java.net
  • Linux Kernel Archives
  • Kernel Traffic
  • DistroWatch.com


  • Sponsored by: