15.3 CD Audio
15.3.1 Duplicate Audio CD Using cdrdao
To directly record an audio CD (or a data CD) using one device and employing cdrdao, the simplest command is:
See Section 15.2.1 for details of setting up cdrdao.
You’ll be asked to insert a new CD-R (or CD-RW) once the reading is complete and it is ready to write.
If you have both a CD drive (or perhaps a DVD drive) and a CD writer
then you can use cdrdao to record direct from the reader
to the writer, assuming the appropriate options for the
write_device and read_device are recored in the
appropriate configuration file (see Section 15.2.1):
To do a copy step-by-step, specifying the device and driver explicitly for cdrdao you can do the following:
$ cdrdao read-cd --device 0,1,0 --driver generic-mmc audiocd.toc
$ cdrdao read-cddb --device 0,1,0 --driver generic-mmc audiocd.toc
$ cdrdao write --device 0,1,0 --driver generic-mmc audiocd.tocThe read-cddb command will look up the CDDB database on the
Internet to find track information for the audio CD and generates a
suitable table of contents that will be written to the CD-R if the CD
writer supports CD-TEXT.
To just create a table of contents for an audio disk:
To add CD-TEXT to the TOC from CDDB (not supported on many CD writers, including the LG)
The cd image is assumed to be in data.wav. Read the image (this
command from gcdmaster):
15.3.2 Duplicate Audio CD Using cdrecord
On Alpine and Festival we can use cdrecord
(which fails on Mint) to duplicate an audio CD in
Disk At Once mode. The SCSI device for the CD-RW is
1,1,0 on Alpine and 0,0,0 and Festival.
First extract the audio from the source CD into individual WAV files:
Record the individual WAV files to CD:
Using cdrecord to record Track At Once mode (with a resulting 2 second gap between each track)
15.3.3 Audio CD From Collection of MP3s
We can use cdrdao to create an audio CD from a colleciton of mp3 files. On Mint this is the way to do it since cdrecord fails. The only complication is the need for a table of contents file, but it is easy to produce. There are issues to do with gaps but this can safely be ignored. Either wav or cdr files can be written by cdrdao to a CD-R disk.
Put the following into /usr/local/bin/mkcdrtoc:
#!/bin/sh
for i in *.mp3; do
if [ ! -e ${i%mp3}cdr ]; then
mpg123 --cdr - $i > ${i%mp3}cdr;
fi
done
printf "CD_DA\n" > disk.toc
for i in *.cdr; do
printf "TRACK AUDIO\nFILE \"$i\" 0\n" >> disk.toc
done
printf "\n========== disk.toc ==================\n"
cat disk.toc
printf "========================================\n"
printf "\n>>>>>>>> Now run \"cdrdao write disk.toc\" <<<<<<<<<<\n"Then the following two steps will convert all mp3 files in the current
directory to cdr, then burn them to a CD-R or CD-RW. If you want to
change the order of the tracks, simply edit disk.toc.
We can alternatively use cdrecord:
Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0