Monday, December 06, 2004

Convert mp3 to wav in GNU/Linux

Sometimes I'm told simple things are hardest to do in Linux... well, I've just downloaded a few old TV songs (difficult to find at stores but easy to find with Emule) and I need to convert mp3s to wavs (my car doesn't play mp3). After a fast search, here I find a simple command lines to do it:

mpg123 -s -r 44100 --stereo "$1" > "$1".raw
sox -t .raw -r 44100 -w -s -c 2 "$1".raw -t .wav -r 44100 -w -s "$1".raw.wav
rm "$1".raw

I know that graphical interfaces use to be easier for Hasefroch users but sometimes I rather prefer a couples command lines 'cause I may use it under different circumstances (no graphical environment required, no distribution dependant, and so on)

Any way there're too very good graphical interfaces, like K3b I recognice it's a damned easy to use!.