Click to See Complete Forum and Search --> : automcatic mp3 converter
jon787
04-07-2002, 04:46 PM
I have a short shell script that does the two commands I use to converty my mp3s to ogg vorbis files. (lame to decode them to wavs, then oggenc to encode them again, if there is a single command that does this then please share). I am wondering how to have this script do an entire directory of mp3s at once?
The current script is as follows:
#!/bin/bash
lame --decode $1.mp3 ~/tmp/$1.wav &&
oggenc -b 128 -o ~/tmp/$1.ogg ~/tmp/$1.wav &&
rm ~/tmp/$1.wav
Strike
04-07-2002, 05:42 PM
Um, you do realize that going from MP3 to ogg results in no quality gain and probably quality loss, right? The only benefity you will get is the much smaller filesize of ogg.
you get to say you use oggs. that's cool (c:
jon787
04-07-2002, 08:42 PM
Originally posted by Strike:
<STRONG>Um, you do realize that going from MP3 to ogg results in no quality gain and probably quality loss, right? The only benefity you will get is the much smaller filesize of ogg.</STRONG>
yes I do, do you realize that I keep getting internal server errors here?
Strike
04-07-2002, 08:58 PM
Originally posted by jon787:
<STRONG>yes I do, do you realize that I keep getting internal server errors here?</STRONG>
Yeah, I keep hearing stories like that :rolleyes: :(
jon787
04-08-2002, 02:03 AM
With some help from other sources I finally came up with this:
#!/bin/bash
for f in *.mp3
do
lame -S --decode $f - | oggenc -Q -q 4 -o ~/tmp/$(basename $f .mp3).ogg -
done
I would have it output the files back into the same directory and remove the origonals, but the mp3s are stored on a windows partition and only the root user can modify them.
[ 08 April 2002: Message edited by: jon787 ]