On Wednesday 20 December 2006 19:59, Ted Harding wrote:
Hi Folks, I have a bunch of MP3s, and would like to convert them to AudioCD files so that I can burn them as succesive tracks on an Audio CD (i.e. in particular, you can pick a track on a CD player, or play the lot through in one go).
I use sox for this.
http://sox.sourceforge.net/ (There are packages for Ubuntu and Debian, and probably most other distros.)
The cdrecord command is fairly picky about the details of the WAVE file format (sampling rate, data size, etc), so
$ sox foo.mp3 -w -c 2 -r 44100 foo.wav
And here's my (probably dodgy) Perl program to do a bunch of these as a batch:
#!/usr/bin/perl # For each "*.wav" produces "*.mp3". while (@ARGV>0) { $oldfile = shift(@ARGV) ; if ($oldfile =~ /(.*).\w+/) { $base = $1 ; } else { $base = $oldfile ; } $newfile = $base . "_w.wav" ; @command = ("sox", $oldfile, "-w", "-c", "2", "-r", "44100", $newfile); print ("about to run: @command\n"); system(@command) ; print ("done with: $base\n") ; }
Happy Christmas and New Year to All!
Same from me!