Monday, November 20, 2006

Capturing Realaudio streams

I saw a very clean method today for capturing Realaudio streams for later use.

This particular method requires Linux, but there probably are other solutions for Windows or Macs. In this case, I am running Ubunty Edgy.

Step 1: Make sure you have the proper software installed.

apt-get install mplayer lame


Step 2: Find an interesting Realaudio stream that you'd like to listen to later or share with your friends.

In my case, I found a wonderful talk about the power of open source within healthcare, which really underscores the reasons why releasing open source software for the healthcare market is not only a good business idea, but why it is simply the right thing to do. As a member of the Board of Directors of a company that holds itself out as the "leading provider of open source for the healthcare industry", this message has particular meaning to me as well. Here's the link to the presentation:

The main page: http://www.calrhio.org/?cridx=525
The actual link: http://www.calrhio.org/crweb-files/docs-summits/20061115/kizer.ram


Step 3: Download the *.ram file to your machine:

wget http://www.calrhio.org/crweb-files/docs-summits/20061115/kizer.ram


Step 4: Inspect the contents of the *.ram file to see the "real" URL for the media:

cat kizer.ram


In this case, you'll see that the actual for the media is stored at UC Irvine's College of Medicine (incidentally, where I attended medical school):

rtsp://media.nacs.uci.edu:554/ITC/CollegeofMedicine/
CalRHIO/OpenSourceForum/kizer.rm


Step 5: Use mplayer to download the actual stream:

mplayer -dumpstream rtsp://media.nacs.uci.edu:554/ITC/CollegeofMedicine/
CalRHIO/OpenSourceForum/kizer.rm


By default, this will save the actual media to a file called "stream.dump".

Step 6: Convert the stream to a pcm/wav audio file:

mplayer -ao pcm stream.dump


By default, this will create a new file called "audiodump.wav".

Step 7: Convert the pcm/wav audio file into an mp3 audio file:

lame --preset standard --tl "Open source healthcare" audiodump.wav oshc.mp3


By default, you'll get some very slick console progress bar action while the file is converting.

Step 8: Listen to your heart's content.

Now, that wasn't too bad, was it? To boot, you can now listen to an excellent talk about open source in healthcare. I know that I will certainly be sharing this with some of my friends.

2 comments:

Anonymous said...

You can elimiate steps 3 and 4 by using -playlist, for example:

mplayer -playlist "http://www.calrhio.org/crweb-files/docs-summits/20061115/kizer.ram"

Steve Shreeve said...

Nice, thanks Eric!