Sometimes when you're watching online videos on youtube or other sites,
you want to save some of them for later offline playback.
You've probably heard of Firefox extensions like DownloadHeloper
that can do this, but sometimes you may only have a bare version
of Firefox, or perhaps a different browser, one that doesn't have
a plugin for doing this.
Using the tip below, you can save videos no matter what browser you're using.

First, find the browser process id:

$ ps xfa | grep firefox # or grep any other browsers' name

Say, we get 12279.
Note that you may get more than one result from the above command:
you need the process id of the binary executable.
The firefox command, for instance, is normally a script
which starts the real binary.

Then, list its opened files, by:

$ ls -lU /proc/12279/fd

This will show you the files opened by the process,
there may be a lot of them.
The file name is the file descriptor number,
it is a symbolic link that points to the
real file that is opened on that file descriptor.
The output will look something like:

Now look for names matching the pattern "/tmp/Flash??????".
In the above example, we see /tmp/FlashZzxRDM.
This is really a .flv file, you can open it with mplayer or any
other video player and see that it is a video.
If you see more than one file you may need to try playing them to
see which one you're looking for.

The last step is to simply copy the file to your home directory,
renaming it in the process (e.g. "jackson.flv").
Wait till after the browser has played the entire video,
otherwise you may get an incomplete file.

1) Some Flash players use the browser's cache so all one has to do is dig around under ".mozilla" (FireFox / SeaMonkey / other Mozzies), ".opera", ".netscape" (Navigator 9), etc. Use your file manager (Konq. / Nautilus / etc.) in reverse chronological order so that the most recently changed files are near the top.

I didn't know about fishing around in "/tmp". Thanks for the tip - I'll be trying it in the next day or so.

2) My usual way of playing ".flv" files is to use the Kaffeine front-end to xine. Due to the age of my distro (SUSE 10 Book) I also have MPlayer (".mov" + DVD's) and Ogle (DVD's) installed. KLUDGE CITY !

3) Google is also very useful because it can lead you to sites like "get2pc.com". That site is a somewhat flaky leech aimed at YouTube + clones. If you go there keep your eyes open for strange, new tabs opening in your browser. That's why I'm not providing a link - I don't want careless surfers getting trapped in web crud.

I made a script that saves videos from the /tmp directory. I then added it to my top panel, and when clicked a zenity GUI box pops up and asks what I want to name my vid. Here is the script below. Go easy on me, it was the first script I ever wrote ; )

This is an oldie, but goodie, and it is a good way to save Flash video files, true. But I don't care for Adobe's buggy player, nor for their legal stance on the file format.

Fortunately, Firefox 3.5 includes Ogg Theora streaming right out of the box, so hopefully video publishers will start adopting it and saying "please install Firefox to view this content." Let's continue to promote this option.