Extracting audio from a video can be troublesome…
For me it seems easier to first convert into wav, as follows :
mplayer -ao pcm:fast:file=audio_out.wav -vo null -vc null video.avi
Then amplify, if needed, using Audacity before encoding into mp3 or ogg :
oggenc -q8 audio_out.wav