I've a .mp3 file and need to convert that to an 1 channel 8kHz 8 bit wav file, anyone know how I can do that with mplayer ? If not, any other commandline tools I could use ?
ffmpeg should do the job. This line will convert to 8kHz 1 channel wav file.
ffmpeg -i input.mp3 -ar 8000 -ac 1 output.wav
I'm not sure about the 8 bits requirement - what are you referring to? It's not the bitrate surely?
lame, the command-line WAV to MP3 encoder, can also decode MP3 to WAV with the
SoX can also do this; assuming your SoX is compiled with MP3 support, all you'd need is
sox input.mp3 -c 1 -r 8000 -1 output.wav
... although you might run into clipping issues, in which case you'd want to play with the
mixer effects to decrease the volume of the input channels before the resampling happens.
Without MP3-enabled SoX, use an MP3 decoder to convert your MP3 to WAV first, then the above command becomes:
sox input.wav -c 1 -r 8000 -1 output.wav