Sunday, July 08, 2007

 

Making an mp3 file of a rstp stream

I found myself wanting to make a permanent copy of a talk given on the web using an rstp address. You might want to do this to be able to share the talk with a friend or colleague - or to view later offline from the web. Here is how this objective can be achieved. The first step is discover the rstp address of the file. This is a little painful - but should always be possible. What worked for me was to launch the talk in a browser (which on windows fired up the Real Player embedded in the browser). This gave me an option to launch the Real Player browser, and this in turn gave me the option to share the presentation with a friend using email. I took this option - and finally ended up with an email message which revealed the rstp://... information required to capture the file. This looks like an http:// address - but to grab the file you need a program that can talk rstp:// - so wget etc. cannot be used. MPlayer does have the requisite functionality though, here is the command line to capture the file:

mplayer -noframedrop -dumpfile example.rm \
-dumpstream rtsp://"long complicated address/filename.rm"

Then you need to convert the captured example.rm file to wav format:

mplayer -ao pcm example.rm

Initially that failed with 'Cannot find codec for audio format 0x72706973' for me - that was a little tedious - but it was cured by returning to the official Mplayer site and just putting the sipr*.dll (from the codecs zip file) in the Mplayer directory. Finally,
 
mplayer -ao pcm example.rm

created 'audiodump.wav' which lame was able to turn into a mp3 file as required

lame -h audiodump.wav example.mp3

So, it takes a few steps - but eventually you get the offline usable mp3 file.

Labels:

Comments: Post a Comment



<< Home
Newer Posts Older Posts