Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Audio CD From Collection of MP3s


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

  $ 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]

 
 
  Published under the terms fo the GNU General Public License Design by Interspire