You are here:About>Computing & Technology>Focus on Linux> Linux Documentation> Newbie Administrator Guide> Linux Newbie Administrator Guide - 7.7 Writing CD-R/Ws: cdrecord and cdparanoia
About.comFocus on Linux
Newsletters & RSSEmail to a friendSubmit to Digg

Linux Newbie Administrator Guide

From Authors

7.7.4 Creating audio CDs

  • Audio tracks have to be in files of *.cdr (I guess it is the same as *.cdda.raw), *.wav (wave), or *.au format before you can write them to a CD.

  • The utility sox converts between the various audio file formats (sox understands quite a few of them). For example, I can convert a .wav file to a .cdr file:

sox my_file.wav my_file.cdr

You don't need to do the conversions manually - cdrecord supports *.wav and *.au directly (it does a conversion from *.wav or *.au to *.cdr "on the fly"). This is very convenient because audio files tend to be large.

  • Audio CDs don't contain a filesystem, they store "raw data". This means that you cannot mount an audio CD. Also, each track is written separately, i.e., as if it was a different "partition" on the CD.

  • To read audio tracks from an audio CD and write them to suitable files on your hard drive (typical format is *.raw or *.wav) , you need a "cd ripper". A popular CD ripper is "cdparanoia".

If cdparanoia is not installed, download it. The installation from source goes as follows (I use the autocompletion <Tab> shortcut when typing the long filenames):

cd /usr/local

tar -xvzf /the_path_to_which_you_downloaded/cdparanoia-III-alpha9.6.src.tgz

ls

cd cdparanoia-III-alpha9.6

./configure

make

make install

To rip the first track from an audio CD, I can use:

cdparanoia 1

which will put the first track from the CD into the wave file "cdda.wav" in the current directory.

To rip tracks 1 to 2 from an audio CD to a "raw" file format, I can use:

cdparanoia -B -p "1-2"

The option -B specifies to use a "batch" mode, so that each track is put into a separate file (this is probably what you want, otherwise all tracks would be placed in one output file). The "-p" option specifies output in raw format. The files are named track1.cdda.raw and track2.cdda.raw .

To rip all tracks from an audio CD, each track to a separate *.wav file, while forcing reading speed 4x, I can use:

cdparanoia -S 4 -B "1-"

Make sure you have sufficient free space on your hard drive. You can use use the space on your DOS partition (if you have dual boot).

  • To write suitable audio files to a CD-R(W), I can use:

cdrecord -v speed=8 dev=0,0,0 -pad -dao -audio track*

  • Some audio CDs do not have gaps between individual audio tracks. The easiest way to make a copy of such an audio cd, is to use the utility "cdrdao".

To copy a disk to the file "data.bin" (on my harddrive), and the table of contents to the file "toc-file.toc", I can use this command:

cdrdao read-cd --device 0,0,0 --buffers 64 --driver generic-mmc-raw --read-raw toc-file.toc

To burn the CD from the files I just created, I can use:

cdrdao write --device 0,0,0 --buffers 64 --driver generic-mmc --speed 12 toc-file.toc

Note on re-writeable CDs. Some stereos will not play re-writeable CDs because of the size of the pits on the CDs. For example, my home stereo (JVC) cannot read re-writable CDs (CD-RW) at all, although it will read write-once disks (CD-Rs). Therefore, re-writable CDs may be good to store data but not audio (unless I plan to play them exclusively on my computer).

* License

* Linux Newbie Administrator Guide Index

 All Topics | Email Article | | |
Advertising Info | News & Events | Work at About | SiteMap | Reprints | HelpOur Story | Be a Guide
User Agreement | Ethics Policy | Patent Info. | Privacy Policy©2008 About, Inc., A part of The New York Times Company. All rights reserved.