[Wolves] Converting a tree of oggs to mp3s

Chris Ellis chris.ellis.intrbiz at googlemail.com
Tue Mar 3 21:21:33 UTC 2009

I had to do this the other day, but the other way round, M4A's -> OGG's.

Simple bash script should do it:

# pipe a list of files into the loop
find ./ | grep .*ogg |while read file ; do
  # get the file name
  name=`basename "$file" .ogg`
  # used oggdec to decode the ogg to wav
  oggdec -o temp.wav "$file"
  # encode the wav to an mp3 with lame
  lame temp.wav "$name.mp3"
rm temp.wav

However remember it will not copy the tags over :(

This site has some decent stuff on it:


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.lug.org.uk/pipermail/wolves/attachments/20090303/4034473d/attachment.htm 

More information about the Wolves mailing list