Specifications

shell> sox killing−my−software.wav killing−my−software.cdr
This command would convert the song killing−my−software from the WAV−format into the CDR
audio−format. See the man page for sox for more details about formats and filename−extensions sox
recognizes. Because the output of the manual conversion takes up much disk space, it was made a built−in
feature of cdrecord for the sound formats WAV and AU. So as long as your sound files have the extensions
.wav or .au (and the sample rate "stereo, 16 bit, 44.1 kHz"), you can use them as audio tracks without manual
conversion into the CDR format. However, cdrecord requires the size of the sound data to be a integer
multiple of 2352 and to be greater than 705,600 bytes, which is not fullfilled for some WAV files. For such
files the usage of sox is needed to pad the audio data up to 2352 bytes.
Writing audio CDs (TAO)
An audio CD consists of audio tracks, which are organized as separate images when using TAO mode. So if
you want to have ten tracks on your CD, you have to make ten images.
Cdrecord writes CD images as audio tracks if the option −audio is specified. The other options are identical
to those used for writing data−CDs (unless you have very special requirements). These three examples all do
the same thing, but read the tracks from different sound file formats:
shell> cdrecord −v speed=2 dev=0,6,0 −audio track1.cdr track2.cdr...
shell> cdrecord −v speed=2 dev=0,6,0 −audio track1.wav track2.wav...
shell> cdrecord −v speed=2 dev=0,6,0 −audio track1.au track2.au...
By doing this, you will produce an audio CD which has a 2 seconds of pause between audio tracks. One
notable format not directly readable by cdrecord is MPEG Layer 3. To convert files in this format to the
CDR−format, you can use the command "mpg123 −−cdr − track1.mp3 > track1.cdr". The option −−cdr
ensures the track is encoded in the required format (see above). Older versions of mpg123 require −s instead
of the plain − to write to stdout. The other direction (converting from WAV to MPEG) can be done with
LAME for WAV−files (extract the track with cdda2wav from the audio CD and encode it into MP3 with the
help of LAME).
To create a CD−R from a whole bunch of MP3−files, you can use the following command sequence:
for I in *.mp3
do
mpg123 −−cdr − "$I" | cdrecord −audio −pad −nofix −
done
cdrecord −fix
Depending on the speed of your machine, you may want to slow down writing to "speed=1" (cdrecord
option). If you use "speed=4", your machine must be able to play the MP3−file at quadruple speed. mpg123
consumes much CPU−time! If you are in doubt, try an empty run with −dummy (keeps the laser switched
CD−Writing HOWTO
Writing audio CDs (TAO) 19