Convert windows media video stream to mp3 audio?

I'd like to take a windows media video stream and convert it to mp3 audio. Using mencoder I can convert from windows media video to avi but not directly from windows media to mp3. The following is the command I use to convert to avi, but I'd like to avoid having to do two conversions and converting the avi file to mp3. mencoder mms://wmslive.media.hinet.net/Weblive_Bloomberg_600 -ovc lavc -oac mp3lame -o output.avi Note if there are tools that can do this I will use them, I have access to both Linux and Windows.


Solution 1:

I think your best bet is to use mencoder to convert to AVI, then use a tool like ffmpeg or tcextract (from the transcode package` to extract the MP3:

$ ffmpeg -i in.avi -acodec copy out.mp3

$ tcextract -i foo.avi -x mp3 > out.mp3 

Using tcextract will do no re-encoding at all and is very fast. ffmpeg isn't supposed to be doing any reprocessing but it's much slower. (Tested on a ~22min AVI file.)

Sadly, it doesn't seem "possible" to do this in one step with mencoder. I tried a couple of different things:

  • mencoder mms://wmslive.media.hinet.net/Weblive_Bloomberg_600 -novideo -oac mp3lame -o out.mp3

    This reports Video stream is mandatory!. No good.

  • mencoder mms://wmslive.media.hinet.net/Weblive_Bloomberg_600 -vc null -oac mp3lame -o out.mp3

    This complains about no -ovc option, but since there's no -ovc null option, that won't do either.

Here's the stream data from mplayer -identify:

ASF file format detected.
ID_AUDIO_ID=1
[asfheader] Audio stream found, -aid 1
ID_VIDEO_ID=2
[asfheader] Video stream found, -vid 2
VIDEO:  [WMV3]  512x384  24bpp  1000.000 fps  552.0 kbps (67.4 kbyte/s)
Clip info:
 name:
ID_CLIP_INFO_NAME0=name
ID_CLIP_INFO_VALUE0=
 author:
ID_CLIP_INFO_NAME1=author
ID_CLIP_INFO_VALUE1=
 copyright:
ID_CLIP_INFO_NAME2=copyright
ID_CLIP_INFO_VALUE2=
 comments:
ID_CLIP_INFO_NAME3=comments
ID_CLIP_INFO_VALUE3=
ID_CLIP_INFO_N=4
ID_FILENAME=mms://wmslive.media.hinet.net/Weblive_Bloomberg_600
ID_DEMUXER=asf
ID_VIDEO_FORMAT=WMV3
ID_VIDEO_BITRATE=552000
ID_VIDEO_WIDTH=512
ID_VIDEO_HEIGHT=384
ID_VIDEO_FPS=1000.000
ID_VIDEO_ASPECT=0.0000
ID_AUDIO_FORMAT=353
ID_AUDIO_BITRATE=0
ID_AUDIO_RATE=0
ID_AUDIO_NCH=0
ID_LENGTH=2133437386.00
ID_SEEKABLE=0

Solution 2:

Use free tool, for example Any Audio Converter:

http://www.any-audio-converter.com/

Solution 3:

Try VLC. Works for practically anything. http://videolan.org