OpenSUSE Linux Rants

OpenSUSE Linux Tips, tricks, how-tos, opinions, and news

My Resume  -  My LinkedIn Profile

February 8, 2006

Capture a WMA stream to an audio file.

by @ 5:02 pm. Filed under General Linux, SUSE Tips & Tricks

Commuting time doesn’t have to be wasted. Throughout the drive, it helps divert my attention from psychotic drivers to have an audio book, talk, or lecture series playing in the background. This practice saves me a lot of stress, and lots of other people the pain of death.

To get these audio files, I download them from the Internet. Generally, it’s easy enough to wget an MP3. What about a Windows Media stream? How can you get that?

First, make sure you have MPlayer and the MPlayer browser plugin installed. Then, you just click on your stream link in the web page. When the audio starts playing, you will see a URL in your address bar, possibly ending in “.asx”. As an example, we’ll say our file is located at http://www.someserver.com/path/audiofile.asx .

What you have to do is wget that URL:

[linux:~]$ wget http://www.someserver.com/path/audiofile.asx

It will download the file. Since it is a text file, you can usually just cat the file:

[linux:~]$ cat audiofile.asx

And you will see the contents of the file.

You are looking for a URL in this text file that starts with “mms” instead of “http”. In this example, let’s say it is “mms://www.someserver.com/path/audiofile.wma”.

Then, to start capturing the stream to an audio file, run this command:

[linux:~]$ mplayer -noframedrop -dumpfile outfile.wma -dumpstream mms://www.someserver.com/path/audiofile.wma

(Except that this all goes on one single commandline)

Pretty useful if you want to capture a Windows Media stream as a regular audio file.

OpenSUSE Linux Rants
Official OpenSUSE Linux Site

internal links:

categories:

SUSE Resources

search blog:

archives:

February 2006
S M T W T F S
« Jan   Mar »
 1234
567891011
12131415161718
19202122232425
262728  

59 queries. 0.508 seconds