Go to TogaWare.com Home Page.
GNU/Linux Desktop Survival Guide
by Graham Williams

Audio CD From Collection of MP3s

We can use cdrdao to create an audio CD from a colleciton of mp3 files. On Mint (104.34) 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:

  for i in *.mp3; do
    if [ ! -e ${i%mp3}cdr ]; then
      mpg123 --cdr - $i > ${i%mp3}cdr;
  printf "CD_DA\n" > disk.toc
  for i in *.cdr; do
    printf "TRACK AUDIO\nFILE \"$i\" 0\n" >> disk.toc
  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.

  $ mkcdrtoc
  $ cdrdao write disk.toc

We can alternatively use cdrecord:

  $ for i in *.mp3; do mpg123 --cdr - $i > ${i%mp3}cdr; done
  $ cdrecord -v dev=0,1,0 -audio -pad *.cdr

Copyright © 1995-2006 [email protected]
Contribue and access the PDF Version