[ale] Capturing a youTube video

Michael B. Trausch mike at trausch.us
Wed Apr 30 13:54:07 EDT 2008


John Mills wrote:
> I would like to capture the stream that is sent from playing a video 
> (identified on its frame as from youTube). How can I do this so I can 
> keep it, replay it locally, and/or send it to someone else?
> 
> I view it with Firefox on a variety of Linux installations.
> 
> Specifically the educational video served in 
> [http://www.komando.com/videos/4-16.asp] would be helpful to _many_ of my 
> friends.
> 

This tip applies to many sites that use a Flash program that plays
things in the same way as YouTube's player does.

When you visit a site that has a media player (for either video or
audio), you can actually get the raw stream from /tmp.  For example,
when I go to YouTube, and play a video from there, the file shows up in
/tmp/FlashXXXXXX where the X's are random characters.

When you navigate away from the site, the temp file will disappear.
There are a couple of ways that you can use that tmp file.  Starting
with Ubuntu Hardy, you can play them directly; just copy them into your
home directory:

  cp /tmp/FlashXXXXXX ~/movie.flv

You can also install ffmpeg2theora, which will give you an Ogg file with
Vorbis audio and Theora video (if the stream has video in it).  You can
also convert it using ffmpeg to a variety of other formats, though the
ffmpeg2theora program's usage is much simpler.

I'm attaching a script that I wrote some time ago to capture select
clips from YouTube using ffmpeg2theora.  I actually wrote it because
there are a few YouTube clips that my 2 year old likes to watch for some
strange reason---they have the strange power to "make everything all
better" in his world, so I wrote this to save them locally prior to
Hardy (and its ability to play Flash movies directly).

	--- Mike
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rip-flash
Url: http://mail.ale.org/pipermail/ale/attachments/20080430/763b674e/attachment.pl 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://mail.ale.org/pipermail/ale/attachments/20080430/763b674e/attachment.bin 


More information about the Ale mailing list