Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
    
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) –  hbdgaf Oct 6 '10 at 19:13
add comment

7 Answers

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
share|improve this answer
    
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 Oct 4 '10 at 14:15
1  
You can use ffmpeg without converting to AVI first. –  Brad Oct 6 '10 at 2:35
add comment

Use free tool, for example Any Audio Converter:

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

share|improve this answer
add comment

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

share|improve this answer
add comment

Not very intuitive, but this seems to do it:

mencoder -of rawaudio -ovc copy -oac mp3lame
share|improve this answer
add comment

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)

share|improve this answer
add comment

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.

share|improve this answer
add comment

ffmpeg -i nameoffile.wmv nameoffile.mp3

share|improve this answer
    
I must admit to to being curious why my correct answer was downvoted. –  CarlF Oct 4 '10 at 20:20
    
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 Oct 5 '10 at 7:32
    
Quack's answer is much more complex than mine. I'm not being defensive so much as puzzled. –  CarlF Oct 5 '10 at 12:12
    
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 Oct 7 '10 at 8:46
    
There are at least a dozen FFMPEG compilations for Windows. Sounds like you found one that doesn't support the Windows Media codecs. –  CarlF Oct 7 '10 at 13:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.