Creating an Audio CD
You can use the cdrw command to create audio CDs from individual audio tracks or from .au and .wav files.
The supported audio formats are:
Format | Description |
---|---|
sun | Sun .au files with data in Red Book CDDA format |
wav | RIFF (.wav) files with data in Red Book CDDA format |
cda | .cda files with raw CD audio data, which is 16-bit PCM stereo at 44.1 kHz sample rate in little-endian byte order) |
aur | .aur files with raw CD data in big-endian byte order |
If no audio format is specified, the cdrw command tries to determine the audio file format based on the file extension. The case of the characters in the extension is ignored.
How to Create an Audio CD
This procedure describes how to copy audio files onto a CD.
Insert a blank CD into the CD-RW device.
Change to the directory that contains the audio files.
% cd /myaudiodir
Copy the audio files onto the CD.
% cdrw -a track1.wav track2.wav track3.wav
The -a option creates an audio CD.
Examples--Creating an Audio CD
The following example shows how to create an audio CD.
% cdrw -a bark.wav chirp.au meow.wav Initializing device...done. Writing track 1...done. done. Writing track 2...done. Writing track 3...done. done. Finalizing (Can take several minutes)...done. |
The following example shows how to create a multisession audio CD. The CD is ejected after the first session is written. Re-insert the CD before the next writing session.
$ cdrw -aO groucho.wav chico.au harpo.wav Initializing device...done. Writing track 1...done. done. Writing track 2...done. Writing track 3...done. done. Finalizing (Can take several minutes)...done. <Re-insert CD> $ cdrw -a zeppo.au Initializing device...done. Writing track 1...done. done. Finalizing (Can take several minutes)...done. |
How to Extract an Audio Track on a CD
Use the following procedure to extract an audio track from a CD and copy it to a new CD.
If you don't use the cdrw -T option to specify the audio file type, cdrw uses the filename extension to determine the audio file type. For example, the cdrw command detects that this file is a .wav file.
$ cdrw -x 1 testme.wav |
Insert a audio CD into the CD-RW device.
Extract an audio track.
% cdrw -x -T audio-type 1 audio-file
-x
Extracts audio data from an audio CD.
T audio-type
Identifies the type of audio file to be extracted. Supported audio types are sun, wav, cda, or aur.
Copy the track to a new CD.
$ cdrw -a audio-file
Examples--Extracting and Creating Audio CDs
The following example shows how to extract the first track from an audio CD and names the file song1.wav.
% cdrw -x -T wav 1 song1.wav Extracting audio from track 1...done. |
This example describes how to copy a track to an audio CD.
% cdrw -a song1.wav Initializing device...done. Writing track 1...done. Finalizing (Can take several minutes)...done. |
How to Copy a CD
This procedure describes how to extract all the tracks from an audio CD into a directory and then copy all them onto a blank CD.
Note - By default, the cdrw command copies the CD into the /tmp directory. The copying might require up to 700 Mbytes of free space. If there is insufficient space in the /tmp directory for copying the CD, use the -m option to specify an alternate directory.
Insert an audio CD into a CD-RW device.
Extract the tracks from the audio CD.
% mkdir music_dir % cdrw -c -m music_dir
An Extracting audio ... message is display for each track.
The CD is ejected when all the tracks are extracted.
Insert a blank CD and press Return.
After the tracks are extracted, the audio CD is ejected, and you are prompted to insert a blank CD.
Example--Copying a CD
This example describes how to copy one CD to another CD. You must have two CD-RW devices to do this task.
$ cdrw -c -s cdrom0 -d cdrom1 |
How to Erase CD-RW Media
You have to erase existing CD-RW data before the CD can be rewritten.
Erase the entire media or just the last session on the CD by selecting one of the following:
Erase the last session only.
% cdrw -d cdrom0 -b session
Erasing just the last session with the -b session option is faster than erasing the entire media with the -b all option. You can use the -b session option even if you used the cdrw command to create a data or audio CD in just one session.
Erase the entire media.
% cdrw -d cdrom0 -b all