Audio CDs
Ripping
Warning!
General Hints
Media Write Speeds
Burning a Data CD
Burning a Data DVDReading non-iso9660 CDs
Downloading and Burning ISO images from RedHat
Burning an Audio CD
On-The-Fly CopyingBurning a Mixed-mode CD
Burning an Enhanced CD (A.K.A CD-Plus, or CD-ROM XA mode 2)
Recording Live Audio
Converting to MP3
Troubleshooting
cdrecord: (CHECK CONDITION)
Drive light on, but nobody's home
"Ripping" means transfering an audio track from an audio CD to the hard drive. This is challenging because the OS cannot receive the audio data in real time, and repositioning the laser accurately is difficult. The CD format was designed for real time streaming access, not random access.
To rip audio tracks, use cdparanoia
Reading the cdparanoia animated output: spaces and happy faces are good, a dash is acceptable.
To rip an entire ISO filesystem from a CD-ROM:
dd if=/dev/cdrom of=my_cdrom.iso
When burning a multi-session audio or data CD, disable auto-mounting. If enabled, the OS will try to both read and write to the CD at the same time, and will cause either a miswrite or will deadlock the kernel. See: .
Media speeds for my CD writer, Plextor 16/10/40A:
Imation CD-R 24x speed=16 Memorex CD-RW 4x speed=4
Use:
if [ ! -e mixed_mode.iso -o -n "`find cd -newer mixed_mode.iso`" ]; then
echo "Cleaning..."
find cd \( -name '*~' -o -name '*.bak' -o -type d -name '.*' -prune \) \
-print -exec rm -rf '{}' \;
echo
echo "Link check..."
html_link_check -start cd/READ-ME.html
echo
echo "Building ISO image..."
mkisofs -o mixed_mode.iso -R -J -r cd
echo
echo "Contents:"
isoinfo -i mixed_mode.iso -f -R -J
echo
fi
Similar procedure as for data CD:
For DVD video, see Video, DVD Production Flow.
RedHat distributes OS as ISO images that can be directly written to
CD-R.
Additional cdrecord options:
On-the-fly copying means that the two CD drives are operating at the same time: the first one reads the source, and the second one writes onto the blank.
Copy an audio CD with this command. It operates in two phases: first copying the audio to a disk file, and then writing to the CD blank.
- X-CD-Roast will do on-the-fly copying for data CDs, but not for audio CDs.
- cdrdao will do on-the-fly copying for audio CDs.
- If both CD drives are on the same ATAPI (IDE) interface, forget about on-the-fly copying. It causes too much traffic on one ATAPI interface. My Plextor with BurnProof was able to handle it, but the transfer buffer was approximately 3% full most of the time -- not where you want to be.
cdrdao copy --device 0,0,0 --source-device 0,1,0 \
--source-driver generic-mmc \
--eject --reload -v 1 -n \
--datafile /media/tmp/cdrdao.bin
A mixed-mode CD has both data and audio. It is a single session CD. The data is visible as a file system to a computer, and the audio is visible to CD players. The drawback to mixed mode is that the data track is visible to CD players, and some will even try to play it, and of course it does not sound good.
To create a mixed-mode CD, create an ISO image as for Burning a Data CD, and collect the audio tracks. Run cdrecord with the like this:
cdrecord "$@" speed=$SPEED dev=ATAPI:0,0,0 driveropts=burnproof -eject \
-data \
mixed_mode.iso \
-pad -audio \
song1.wav \
song2.wav \
(etc.)
Similar to a mixed-mode CD, an enhanced CD also has both data and audio, and is a multi-session CD. The audio is written in the first session, and the data is written in the second session. Most CD players can only see tracks in the first session, effectively hiding the data track. The drawback to enhanced format is that some CD players cannot read multi-session CDs at all. See this entry in the CD-Writing HOW-TO on creating multi-session CDs.
To create an enhanced CD, arrange the data for an ISO image as for Burning a Data CD, and collect the audio tracks.
1. Write the audio tracks. Be sure to specify the -multi flag:
cdrecord "$@" speed=$SPEED dev=ATAPI:0,0,0 driveropts=burnproof \
-multi -audio -pad \
song1.wav \
song2.wav2. Determine where the free space on the CD begins with:
NEXT_TRACK=`cdrecord -msinfo`3. Create an ISO image using the two numbers returned in step 2:
mkisofs -o cd_plus.iso -R -J -C $NEXT_TRACK -r cd4. Verify the ISO image with:
isoinfo -i cd_plus.iso -f -R -J -N ${NEXT_TRACK/*,}5. Write the data track:
cdrecord "$@" speed=$SPEED dev=ATAPI:0,0,0 driveropts=burnproof -eject \
-data -pad \
cd_plus.iso
Here is a script to help manage ISO contents (where "cd" is the directory with the contents):
# Default speed
SPEED=10
# Process arguments. Identify speed and "blank" directives.
SESSION_1_ARGS=
SESSION_2_ARGS=
for A in "$@"; do
if [ "blank=" = "${A:0:6}" ]; then
# Erase only before first session.
SESSION_1_ARGS="$SESSION_1_ARGS $A"
elif [ "speed=" = "${A:0:6}" ]; then
SPEED=${A#speed=}
else
SESSION_1_ARGS="$SESSION_1_ARGS $A"
SESSION_2_ARGS="$SESSION_2_ARGS $A"
fi
done
# Audio session.
cdrecord $SESSION_1_ARGS speed=$SPEED dev=ATAPI:0,0,0 driveropts=burnproof \
-multi -audio -pad \
cd/song1.wav \
cd/song2.wav
# Figure out if the ISO image should be remade.
# Note that audio files are stored inside the 'cd' directory.
if [ ! -e cd_plus.iso -o -n "`find cd -newer cd_plus.iso`" ]; then
echo "Cleaning..."
find cd \( -name '*~' -o -name '*.bak' -o -type d -name '.*' -prune \) \
-print -exec rm -rf '{}' \;
echo
echo "Link check..."
html_link_check -start cd/READ-ME.html
echo
echo "Building ISO image..."
NEXT_TRACK=`cdrecord -msinfo`
echo $NEXT_TRACK > cd_plus_msinfo
mkisofs -o cd_plus.iso -R -J -C $NEXT_TRACK -r cd
echo
echo "Contents:"
isoinfo -i cd_plus.iso -f -R -J -N ${NEXT_TRACK/*,}
echo
fi
# Data session.
cdrecord $SESSION_2_ARGS speed=$SPEED dev=ATAPI:0,0,0 driveropts=burnproof -eject \
-data -pad \
cd_plus.iso
Use lame to convert to mp3 format with:
lame -h --vbr-new -p --strictly-enforce-ISO \
--tt 'track title' --tn <track-number> \
--ta 'author' \
--tl 'album title' \
--ty <year-of-issue> --tc <comment> \
file.wav file.mp3
Where:
A complete failure of cdrecord of the form:
cdrecord: Input/output error. read track info: scsi sendcmd: no error
CDB: 52 01 00 00 00 FF 00 00 1C 00
status: 0x2 (CHECK CONDITION)
Sense Bytes: 70 00 05 00 00 00 00 0A 00 00 00 00 24 00 00 00
Sense Key: 0x5 Illegal Request, Segment 0
Sense Code: 0x24 Qual 0x00 (invalid field in cdb) Fru 0x0
Sense flags: Blk 0 (not valid)
cmd finished after 0.000s timeout 240s
Writing time: 0.009s
may indicate damaged media. Try a new CD blank. I had a repeated failure which was caused by attempting to record with GnomeToaster which for some reason had bad settings (really bad, apparently). The trouble maker was the "tsize" option was not compatible with cdrecord 2.0: remove it! Further bugs prevented the operation from completing. (Dummy recording mode is a great way to start.)
Here's a checklist:
Look in /var/log/messages -- was the drive recognized during boot?
If not, check your jumpers or BIOS.
As root, run cdrecord dev=/dev/hdc -inq (replace /dev/hdc with your device). Expect to see the same identification the kernel received.
No such file or directory -- Are you sure you have the correct device (see /var/log/messages again)? Maybe udev did not create the device for you.
As root, run cdrecord dev=/dev/hdc -prcap
Expect to see a long list of device capabilities.
Insert a data CD into the drive (blank or used, doesn't matter). As root, run cdrecord dev=/dev/hdc -atip
Expect to see data about the medium.
medium not present -- that's
not good. Maybe your drive is broken, or may it's confused. Try
shutting down system and powering off. Shut off power supply or remove
power cable for 5 seconds -- "reboot" will not do.
With data CD in drive, as root run mount -r iso9660 /dev/hdc /mnt/cdrom (replace /mnt/cdrom as appropriate).
Expect file system to mount. Try ls -l /mnt/cdrom
mount: no medium -- that's not good. If you already powered off, I'm not sure what else you can do.
As non-root user, try the commands shown above.
Permission denied -- check device permissions. You may not be in the correct access group. Check with the groups command. Add yourself and login again.
udev may have assigned incorrect permissions.
cdrecord-ProDVD terminates with the mysterious message:
Last chance to quit, starting real write 8 seconds.Alarm clock
Either your license key is out of date, or the built-in one year expiration has been exceeded. emerge app-cdr/cdrecord-prodvd-2.01.01_p03 or greater (see this Gentoo discussion topic) or use growisofs from the dvd+rw-tools package.
| Copyright © 2004-2007 Craig Lawson | ||
| Index | ![]() |