-michael- wrote:
> 
> >  try this for audio cd's....
> what about mp3's onto cd's will this work?

No.  At least not if you want to play them in a non-mp3-understanding
audio cd player.  You must first convert the mp3 files to a format
understood by cdrecord (cdr, wav, au).  You can use mpg123 to do that,
like so:

$ mpg123 --cdr Song.cdr Song.mp3

That will create the file, Song.cdr, from the file, Song.mp3.  You can
then feed the cdr file directly to cdrecord.  

$ cdrecord -v dev=0,0,0 speed=2 -audio -pad *.cdr 

That will burn onto the cd all the cdr files in the current directory. 
You could do wav files instead of cdr files...

$ mpg123 --wav Song.wav Song.mp3
$ cdrecord -v dev=0,0,0 speed=2 -audio -pad *.wav 

...but cdrecord is transparently converting the wav files to cdr anyway,
so you may as well save a step.

What I usually do is take 20 or so mp3 files and put them in one
directory.  If you use xmms to organize your playlist, it will show you
the total playing time for your tracks -- stop when you hit about 74
minutes.  I then convert them all to cdr files in one fell swoop:

$ cd ~/mp3/CoolTunes
$ mkdir tmp
$ for i in *.mp3; do mpg123 --cdr tmp/`basename "$i" .mp3`.cdr $i; done

<ShellQuotingHell>
Of course, the above for loop won't work if any of your files contain
spaces in their names, as so many mp3 files do.  In that case, you'll be
forced into the inner circles of shell quoting hell:

for i in *.mp3
do 
sh -c "mpg123 --cdr \"tmp/`basename "$i" .mp3`.cdr\" \"$i\""
done

Or something like that.  Some napster clients provide options for
converting spaces to underscores automatically.  If you're making cd's
from the command line, that option is your friend.  :-)
</ShellQuotingHell>

Once you have all the cdr files in their own directory, check that
they're within the limits of your cd's capacity:

$ du -sh tmp

You can create additional cdr files in that directory to bring the total
up to 650MB or so.

Once you're satisfied with the contents of that directory, do this:

$ cd tmp
$ cdrecord -v dev=0,0,0 speed=2 -audio -pad *.cdr 

That assumes you either a) don't care about the order of the tracks
since you usually shuffle them on your player anyway, or 2) you've
painstakingly named the files so that they come up in the correct order
when the shell expands the wildcard, *.cdr.  You can use the ls command
to check your work if you use the latter method.  Or you can be explicit
with cdrecord:

$ cdrecord -v dev=0,0,0 speed=2 -audio -pad Song1.cdr Song2.cdr
Song3.cdr

Good luck!
-- Jim
http://www.lads.com/~jim

Reply via email to