Extract/Convert audio stream of a video file into MP3

@ECHO OFF
REM Description: Extract/Convert audio stream of a video file into MP3.
REM Requirements: 
REM   -Mplayer / Mencoder / FFmpeg

REM --------------------------OPTIONS-------------------------------
REM mencoder %1 -of rawaudio -oac mp3lame -ovc copy -o "%~n1".mp3

REM Slow: Convert audio stream to MP3.
REM ffmpeg -i %1  -f mp3 "%~n1".mp3
REM ffmpeg -y -i %1 -f mp3 -aq 2 "%~n1".mp3

REM Fast: Dump original audio stream to file.
REM mplayer -dumpaudio %1 -dumpfile "%~n1".mp3
REM mencoder -ss 00:00:00 -endpos 00:01:30 %1 -of rawaudio -oac mp3lame -ovc copy -o "%~n1".mp3
REM ----------------------------------------------------------------
 
FOR /F "delims=" %%W IN ('dir /b *.mp4') DO (
CALL :DO_WORK_IN_LOOP "%%W"
)
GOTO :EOF
 
:DO_WORK_IN_LOOP
  ECHO %time% >> elapse.txt
  ECHO %1 >> elapse.txt
  ffmpeg -i %1  -f mp3 "%~n1".mp3
  ECHO %time% >> elapse.txt
  ECHO ------------------------>> elapse.txt
  GOTO :EOF

Note: http://oss.netfarm.it/mplayer-win32.php http://ffmpeg.arrozcru.org/ http://ffmpeg.org/trac/ffmpeg/wiki/Encoding%20VBR%20%28Variable%20Bit%20Rate%29%20mp3%20audio