[NTLUG:Discuss] Transcoding MP3s

agoats agoats at compuserve.com
Sat Jul 15 18:09:40 CDT 2006


Since you don't seem to be getting any good answers, here's some real
help:

Using lame:

#!/bin/sh

for i in *.mp3
do
    file=${i%.mp3}
    echo $FILE

    lame -b 128 -cbr ${FILE}.mp3 /user/${FILE}.mp3
done

for i in *.MP3
do
    file=${i%.MP3}
    echo $FILE

    lame -b 128 -cbr ${FILE}.MP3 /user/${FILE}.mp3
done



The above will convert the current directory of mp3's to 128kbps bit
rate, 44.1kHz sample rate, constant bit rate mp3's in directory  /user.
The format is repeated for *.MP3 and if you have any Mp3, you need to
add that section as well.


The only problem I have with this is filenames with spaces, those are
skipped. Anyone know how to correct that?

Alvin



More information about the Discuss mailing list