Convert windows media video stream to mp3 audio?

3

3

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.

Jared

Posted 2009-11-02T10:35:59.797

Reputation: 2 175

can someone try this: mplayer -dumpaudio mms://whatever -dumpfile nodame_theme.mp3 I have a lame ISP and I can't hit many non-standard ports in a lot of places(git and svn are blocked for europe and china too) – RobotHumans – 2010-10-06T19:13:11.987

Answers

2

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

quack quixote

Posted 2009-11-02T10:35:59.797

Reputation: 37 382

This is basically what I did. I have a cron job set up to use mencoder to record a stream as an avi file for an hour, then transcode the avi to mp3 using ffmpeg, then speed the mp3 up with sox. – Jared – 2010-10-04T14:15:31.860

1You can use ffmpeg without converting to AVI first. – Brad – 2010-10-06T02:35:34.750

2

Use free tool, for example Any Audio Converter:

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

Denis Barmenkov

Posted 2009-11-02T10:35:59.797

Reputation: 141

1

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

sonoftsadik

Posted 2009-11-02T10:35:59.797

Reputation: 126

1

Not very intuitive, but this seems to do it:

mencoder -of rawaudio -ovc copy -oac mp3lame

raj

Posted 2009-11-02T10:35:59.797

Reputation: 11

0

For windows, any of the free video to audio converting tools like

effectmatrix.com/total-video-converter OR jetaudio.com

Jet Audio is a full-fledged media player as well as converter tool (sorry for typing links like this, but superuser is not allowing me to post more than two links, some sort of spam-protection error popping in sigh)

For linux, the in-built ff-mpeg will do the job (See documentation of ff-mpeg for the correct syntax on how to do the job)

Rish

Posted 2009-11-02T10:35:59.797

Reputation: 111

0

From How to capture, save, record or download streaming audio for free (Windows) :

One surefire way of recording streaming audio from any web site is to simply capture it via the sound card on your computer.

If you don’t mind having another toolbar installed in your browser window, FreeCorder is a very convenient program to use if you’re going to be recording music that’s mostly played via the web, such as Internet radio, etc. Also, it has many other features that make it quite useful, such as the ability to extract audio from videos and record from your PC’s microphone or line-in port.

If you don’t like the idea of cluttering up your browser toolbar, you can use a standalone program called MP3MyMP3 Recorder, which is also free. Like FreeCorder, this program also records whatever is being played by your computer’s speakers. However, unlike FreeCorder, this program requires that your sound NOT be muted.

harrymc

Posted 2009-11-02T10:35:59.797

Reputation: 306 093

-1

ffmpeg -i nameoffile.wmv nameoffile.mp3

CarlF

Posted 2009-11-02T10:35:59.797

Reputation: 8 576

I must admit to to being curious why my correct answer was downvoted. – CarlF – 2010-10-04T20:20:00.517

I didn't do it, but probably because this was already answered by quack quixote. Best to delete your answer, to avoid more such. – harrymc – 2010-10-05T07:32:13.790

Quack's answer is much more complex than mine. I'm not being defensive so much as puzzled. – CarlF – 2010-10-05T12:12:17.553

Testing this on two different WMV's, it only gives unsupported codec. Quack's answer however, does convert. Playing the file though does not: could not determine type of stream – invert – 2010-10-07T08:46:53.130

There are at least a dozen FFMPEG compilations for Windows. Sounds like you found one that doesn't support the Windows Media codecs. – CarlF – 2010-10-07T13:43:36.557