≡ Menu

How Do I Burn MP3 onto an audio CD from Linux shell command prompt?

Recently I decided to burn selected MP3 files on an audio CD from command prompt.

First, you need to convert your mp3 (myfile.mp3) into .wav (myfile.wav) file:
$ mpg123 -w myfile.wav myfile.mp3
Use above command to convert all files to mp3

Then burn all .wav file on to the CD
# cdrecord -dev=ATA:1,0,0 -eject speed=4 -pad -audio *.wav

For more information see:

Share this on:

Your support makes a big difference:
I have a small favor to ask. More people are reading the nixCraft. Many of you block advertising which is your right, and advertising revenues are not sufficient to cover my operating costs. So you can see why I need to ask for your help. The nixCraft, takes a lot of my time and hard work to produce. If you use nixCraft, who likes it, helps me with donations:
Become a Supporter →    Make a contribution via Paypal/Bitcoin →   

Don't Miss Any Linux and Unix Tips

Get nixCraft in your inbox. It's free:

{ 5 comments… add one }
  • Rob December 7, 2005, 10:58 am

    You can use lame to encode the WAVs to MP3s. Once wav file created using cdparanoia you can use lame to encode the file wav to an MP3:

    lame myfile.wav myfile.mp3

    lame also supports bitrate option for example to use 256 kilobytes bitrate you can use:

    lame -b 256 myfile.wav myfile.mp3

    Read man page of lame for all supported options.

  • Kan June 15, 2007, 11:30 pm

    to convert all mp3 files at once, do:
    for i in *.mp3; do mpg123 -v -w "${i%mp3}wav" "$i"; done

    • ANonymous July 16, 2010, 10:54 pm


  • Jake April 1, 2011, 9:58 pm

    To convert all mp3 files, accounting for spaces in names and correcting the “filename.mp3.wav” naming, try:

    IFS=$'\n' ; for i in $(ls |grep mp3$) ; do echo $i ; mpg123 -w `basename $i .mp3`.wav $i ; done
    • El_Siurell April 22, 2012, 10:10 am

      You did not set back IFS:
      add last command :
      IFS=$’ \n\t’

Leave a Comment

   Tagged with: , , , , , , , , , ,