elfs: (Default)
[personal profile] elfs

It used to be possible for Linux users to find and save the movie file from a Flash download with earlier versions of the Flash plug-in.  Flash put the file in the /tmp directory and if you were quick you  could copy it elsewhere.  If you had a plethora of Flash files, you could often find the one you wanted with a simple ls -lt /tmp/Flash* , which sorts the files in order from newest to oldest.

The latest version of Flash does something tricky, though.  It creates a temporary file to hold the Flash object, then, while keeping the handle to the file open, immediately deletes it.  This means that the Flash application can continue to access and use the file until you navigate away from it, but it no longer shows up in directory listings.

However, if you’re really Linux savvy, there are ways around even this little annoyance.

Looking for a Flash movie you’re looking at right now?  First, run this: lsof | grep Flash .  On my computer, the output was:

midori     9206  elf   57u      REG        8,3  10012691     64772 /tmp/FlashXXKoFQgx (deleted)

There’s that noxious little “(deleted)” flag, too.  But you have a hint.  First, your process id in 9206, and the file descriptor is 57.  Now, you can just cp /proc/9206/fd/57 /home/elf/movie.flv and there you go.  File copied.  At least, it’s worked for me the few times I’ve done it recently.

Lsof is a program that lets you identify all the open resources a running program is using. In this case, my running program is midori, a Gecko-using browser with a long history of trying to keep up. By identifying the resource, I can then wander down the /proc tree, getting at the process’s available resources directly. As a user, I’m free to access (and muck up) my own resources without risking anything or anyone else on the system– Linux is good about that.

This entry was automatically cross-posted from Elf's technical journal, ElfSternberg.com

Date: 2010-11-16 07:38 am (UTC)
From: [identity profile] elbowfetish.livejournal.com
If you do that, how can you identify compliance with the rights?

Date: 2010-11-16 02:27 pm (UTC)
From: [identity profile] http://users.livejournal.com/_candide_/
Ok. That's just a really cool trick. And some good Linux-foo.

FlashGot?

Date: 2010-11-24 09:44 pm (UTC)
From: [identity profile] pendorbound.livejournal.com
Nifty /proc goodness (filed for future use)!

Have you run into the FlashGot extension for Firefox? Maybe not so helpful if Midori doesn't implement the FF extension API. FlashGot makes it one-click to capture media files referenced by Flash objects. It puts an icon in the bottom status bar when it detects anything. You just click the icon to start downloading or else right-click to choose from one of several media files or several Flash instances on the page.

Profile

elfs: (Default)
Elf Sternberg

June 2025

S M T W T F S
1234567
891011121314
15161718192021
22232425262728
2930     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 5th, 2025 09:45 am
Powered by Dreamwidth Studios