Thursday, November 13, 2008

How to get mplayer to make mp4 audio streams mp3s

After 30 minutes of struggling with mplayer's pathetic documentation, I finally figured out the secret recipe to convert a file from mp4 (or, probably, any other format mpalyer can grok such as flv, etc) in to mp3 format:

mencoder -of rawaudio file.mp4 -o file.mp3 -oac mp3lame -ovc copy

It would have been nice if mplayer's documentation made this clearer (when I think of "raw audio", I think of a headerless PCM stream of audio, which is a pain to deal with)