[linux-audio-user] converting large number of ogg's to mp3's

Jan Depner eviltwin69 at cableone.net
Sat Jan 8 14:22:44 EST 2005


On Sat, 2005-01-08 at 11:50, rob wrote:

> to convert the files I'm just doing:
> 
> sox /shared/music/albums/albumName/song.ogg ~/mp3/albumName/song.mp3
> 
> using find I'm not sure how I change the extension from ogg to mp3.
> 

Here's the simple solution:

cd /shared/music/albums
find . -name \*.ogg -print -exec sox {} {}.mp3 \;

This will take any file under /shared/music/albums and create an mp3
file with the same name plus a .mp3 extension.  In other words,
/shared/music/albums/albumName/fred.ogg will still be there but so will
/shared/music/albums/albumName/fred.ogg.mp3.  When it's finished you can
move them wherever you want and use rename to change the name from
*.ogg.mp3 to just .mp3 (although leaving it as .ogg.mp3 would at least
tell you that you've converted from one compressed format to another).

Jan





More information about the Linux-audio-user mailing list