On Tuesday 22 March 2005 08:19 pm, Mikkel L. Ellertson wrote:

> > I got into this thread a little late, kind of behind on reading, anyway,
> > I use the below script in 9.0, called mp32wav.
> >
> > #!/bin/bash
> > # mp32wav
> >
> > mp3file="$*"
> > mkdir wav
> >
> >
> > for file in "$@"  ; do
> >         #echo "$file"
> >         wavfile=`echo "$file" | sed s/\\.mp3/.wav/`
> >         printf "%-50s %-50s\n" "$file" "--> $wavfile"
> >
> >         # to encode wav-->mp3
> >         #lame -h "$file" "$mp3file"
> >
> >         # to encode mp3-->wav
> >         mpg123 -b 10000 -s "$file" | sox -t raw -r 44100 -s -w -c2 -
> > "wav/$wavfile"
> > done

>
> Interesting script. But what happens if is did something like:
> mp32wav /home/mikkel/mp3/test.mp3
>
> You may want to consider using basename to strip off the .mp3, as well
> as the path to to source file, when creating the output file name. (I
> don't even want to get into creating an output directory off the current
> directory without any checking...)
>
> Mikkel

If I remember correctly I put the script someplace like /usr/share 
or /usr/local and would just run it from the ~/mp3s dir.  I'd put all the 
mp3's I wanted to convert into that dir and run the script after cd'ing to 
that dir.  Or am I missing something in your question.  Note:  I did not 
write this script, it was posted to the list a couple of years ago, I can't 
even begin to recall who the author was, maybe he/she are still on the list.

Chris

-- 
Chris
Registered Linux User 283774 http://counter.li.org
21:37:28 up 9 days, 2:12, 1 user, load average: 0.49, 0.30, 0.24
Mandrake Linux 10.1 Official, kernel 2.6.8.1-12mdk
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I don't know why we're here, I say we all go home and free associate.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

____________________________________________________
Want to buy your Pack or Services from MandrakeSoft? 
Go to http://www.mandrakestore.com
Join the Club : http://www.mandrakeclub.com
____________________________________________________

Reply via email to