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

by LinuxTitli on October 21, 2005 · 4 comments

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:

Featured Articles:

Share this with other sys admins!
Facebook it - Tweet it - Print it -

We're here to help you make the most of sysadmin work. So, subscribe!

{ 4 comments… read them below or add one }

1 Rob December 7, 2005

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.

Reply

2 Kan June 15, 2007

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

Reply

3 ANonymous July 16, 2010

nice

Reply

4 Jake April 1, 2011

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

Reply

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <blockquote> <pre> <a href="" title="">
What is 12 + 6 ?
Please leave these two fields as-is:
Are you a human being? Solve the simple math so we know that you are a human and not a bot.




Previous post:

Next post: