converting mp3/ogg into wav
james at grayonline.id.au
Sun May 29 23:34:01 UTC 2005
On Sat, 28 May 2005 09:31 pm, FTP wrote:
> any good suggestion about a tool that converts mp3/ogg back to wav?
mpg321 will do this if you're after a command line tool (which also means
you can script it!):
sudo apt-get install mpg321
mpg321 -w wavfile.wav mp3file.mp3
Done :) Plus it's much faster than "real-time", unlike the Xmms option which
will only be done at normal time while you listen to the tracks.
To script a whole directory into wav's you might want to try something like
this (untested off-the-top-of-my-head hack):
for MP3 in `ls -d *.mp3`
WAV=`echo $MP3|sed s/\.mp3$//`
echo "Converting $MP3 -> $WAV.wav"
mpg321 -w $WAV.wav $MP3
This script assumes it is running in the same directory as the mp3's and
your mp3 collection all have extensions with ".mp3" (ie lower case). Play
with the WAV=`....` if your filenames aren't output properly :)
Too much of everything is just enough.
-- Bob Wier
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
More information about the kubuntu-users