how to save streaming real media

NoOp glgxg at sbcglobal.net
Tue Apr 8 19:21:53 UTC 2008


On 04/08/2008 06:06 AM, Santanu Chatterjee wrote:
> Hi Everybody,
> 
> Is there any way to save the streaming web casts (say, the ones
> from UC Berkeley) on my Ubuntu PC? I am behind an http proxy.
> I tried saving them with mplayer, but have been unsuccessful
> so far.
> 
> Regards,
> Santanu Chatterjee
> 

This first part is youtube & flash oriented, and very simplified as I
posted it on the Mozilla SeaMonkey group sometime back. Info on rm
streams follows the flash info.

====
For Ubuntu/Debian users (and probably most linux) here is a simple trick
for keeping the video on your hard drive:

[Simplified for new Ubuntu users w/Gnome]

After you've played the video (example:
http://www.youtube.com/watch?v=B-kKKXB2_ZI&NR=1 - that's a clip of
Mohammad Ali) and with the _video screen still open_, go to Places|Home
Folder - click the tiny arrow next to 'File System' and then go to the
'tmp' folder. If you close the flash - the tmp file will go away, so
don't close the window until you're finished copying (below).

You will see the file that was downloaded to play the video. Just
right-click to copy and then paste to a folder in your home directory
and then rename it to something that makes sense. You can add a .flv or
.swf extension after the filename if you wish so that people with
Windows systems can understand what the heck it is if you send it to
them, but it's not necessary if you only use it on your system as linux
will automatically recognize it as a Flash video.

To play the video from your hard drive in it's new location, just
double-click it and MoviePlayer will automatically come up and start
playing the video.
====

I realize that does not work with a RM stream, but UC Berkeley also
publish using Flash:

http://www.youtube.com/ucberkeley

If you're lucky the course might be in flash. Otherwise, to capture an
rm use mplayer (sorry - I know you already have mplayer, but I'm adding
how to get mplay for others that might not know how, so bear with me):

http://www.mplayerhq.hu/DOCS/HTML/en/streaming.html#streaming-save

$ sudo apt-get install mplayer mozilla-mplayer mplayer-fonts

Also see:
https://help.ubuntu.com/community/MPlayer
https://help.ubuntu.com/community/RestrictedFormats

You'll need to know the rm url, so the first thing is to save the
metafile. Open that file in a text editor to see the actual rm url. Then
from a terminal window:

mplayer <rmurl> -dumpstream -dumpfile <streamfilename>

So, for example, to capture the tomography lecture:
<http://webcast.berkeley.edu/course_details.php?seriesid=1906978282>

I determine that the actual rm URL is:
<rtsp://169.229.131.16:554//bibs/s2006/group1/ee225b/20060118.rm?start=2:27&end=1:13:40>
I do this by right clicking the tomography rm php (the one on the left
with the eye icon) and save that to file (stream.php) to my disk. I then
open the file with the text editor and can see & copy the actual rm url
link.

And to capture I drop everything after the .rm?, so:

$ mplayer
rtsp://169.229.131.16:554//bibs/s2006/group1/ee225b/20060118.rm
-dumpstream -dumpfile tomography.rm

[above is all one line]

and mplayer goes out, starts the stream, and dumps to the file
tomography.rm. Be sure to wait for the entire stream to finish,
otherwise you'll be left with a partial file. Note: the above is a very
large stream - 138.5MB, so unless you're _really_ interested in
tomography don't bother :-) Also, the file will have a bunch of color
bar/tone junk at the front, but once past that the entire lecture is
there & plays in both RealPlayer and Mplayer just fine.

Also note that this url uses port 554, so you'll need to open that on
your proxy/firewall in order to actually get the example stream this way.










More information about the ubuntu-users mailing list