#!/bin/sh
# ogg2mp3
# 
# by gruen
# converts ogg to mp3 with variable bitrate
# and keeps the oggfile
# usage: ogg2mp3 inputfile.ogg

# decode ogg
oggdec $1 -o ogg2mp3.tmp

# encode with variable bitrate to mp3
lame -V 4 ogg2mp3.tmp $1.mp3

# set the name for the new mp3file
rename 's/ogg\.mp3/mp3/' $1.mp3

# clean up
rm -f ogg2mp3.tmp 

