Burning mixed CDs

There are two ways to mix audio and data on a CD. The first is to use a single session, using the first track for data and the rest for audio (this works because most CD players will ignore the data track). The command (Debian) is something like

wodim -v dev=/dev/cdrom -data cdimage.raw -audio track*.cdaudio

The second option is the best according to advice I’ve found, and the only I’ve actually tried. It’s to burn a two-session CD, puting audio in the first session and data in the second. This second session is ignored by players, but can be read by a computer when you mount the CD.

This is how you do it: First, burn the audio:

wodim -v dev=/dev/cdrom [-sao] -multi -audio  *.wav

(-v = verbose, -sao = session-at-once). Now find and save the number of the last record written:

NEXT_TRACK=$(cdrecord -msinfo)

Create the image:

genisoimage -o image.iso -r -J -C $NEXT_TRACK cd-data/*

(-J = Joliet, -r = intelligent Rock Ridge, -C = starting sector). To verify the image:

isoinfo -i cd_plus.iso -f -R -J -N ${NEXT_TRACK/*,}

Finally, burn the second session:

wodim dev=/dev/cdrom -eject -data cd_plus.iso
comments powered by Disqus