In Google Chrome on Linux, where is the flv if not in /tmp?
Solution 1:
I observed that the recent Flash plugins do store files in /tmp, but they use a trick of removing them and keeping a filehandle open to keep them alive. This means they are still kept on the drive (as long as the filehandle is opened by flash plugin), but they are not visible in directory listing (because the file has been deleted).
I wrote about this some time age: getting flash videos from almost deleted files
But it all depends on version of Flash plugin. It used to store movies in /tmp or in browser's cache too.
Solution 2:
Checking /proc//fd/ did the trick for me:
$ ps x | grep npviewer
24657 ? Sl 12:33 /usr/lib/nspluginwrapper/i386/linux/npviewer.bin ...
$ cd /proc/24657/fd
$ ls -l
total 0
lr-x------ 1 omab omab 64 2011-02-11 02:13 0 -> /dev/null
lrwx------ 1 omab omab 64 2011-02-11 02:13 1 -> /home/omab/.xsession-errors
lr-x------ 1 omab omab 64 2011-02-11 02:13 10 -> /home/omab/.mozilla/firefox/og3emjry.default/key3.db
lrwx------ 1 omab omab 64 2011-02-11 02:13 11 -> /tmp/FlashXX0WG0J5 (deleted)
lr-x------ 1 omab omab 64 2011-02-11 02:13 12 -> pipe:[9004372]
...
The file 11, the one marked as "(deleted)", still points to the file originally created on /tmp/, so it's not completely deleted:
$ file -L 11
11: Macromedia Flash Video
doing an:
$ mplayer 11
will reproduce the FLV file.
Here is a quite handy command line adapted from the above procedure. It may require minor adjustments for your distribution / installation and what processes you're usually running.
You can replace flash
with npviewer
, replace vlc
with mplayer
:
FLASHPID=\`pgrep -f flash\`; vlc /proc/$FLASHPID/fd/\`ls -l /proc/$FLASHPID/fd | grep tmp | cut -d" " -f9\`
Solution 3:
Flash streams most of the time are simple file get by an http request.
For your video at http://blip.tv/file/3627639
In Google Chrome you can inspect network requests (ctrl + shift + i
)
look for the longest to finish in your case :
Fosslc-..
/file/get
click on it and copy/paste url from 'Request URL' field, to a new tab
http://blip.tv/file/get/Fosslc-2...to823.flv?showplayer=20110401114509&source=1
Solution 4:
Yang,
Yeah, it's in ~/.cache/google-chrome/Cache (well, I have Chromium installed so I found it in ~/.cache/chromium/Cache).
If you watch the video and sort by time stamp:
$ ls -rt | tail
f_00003a
f_00003b
f_00003c
f_00003d
data_2
data_3
index
data_1
f_000040
data_0
Then if you run the file command you'll see which ones are Flash:
$ file $(ls -rt | tail)
f_00003a: Macromedia Flash data (compressed), version 9
f_00003b: Macromedia Flash data (compressed), version 9
f_00003c: Macromedia Flash data (compressed), version 10
f_00003d: PNG image data, 1024 x 768, 8-bit/color RGBA, non-interlaced
data_2: data
data_3: data
index: data
data_1: data
f_000040: Macromedia Flash Video
data_0: data
OK, I installed Google Chrome to check it out.
Looks like the directory for Google Chrome is slightly different from Chromium.
Using the same techniques (here specifying the process ID of the browser, output removed some columns for clarity):
$ lsof -p 27922 | grep Cache
chrome 27922 mem ~/.cache/google-chrome/Default/Cache/index
chrome 27922 mem ~/.cache/google-chrome/Default/Cache/data_3
chrome 27922 mem ~/.cache/google-chrome/Default/Cache/data_2
chrome 27922 mem ~/.cache/google-chrome/Default/Cache/data_1
chrome 27922 mem ~/.cache/google-chrome/Default/Cache/data_0
chrome 27922 71u ~/.cache/google-chrome/Default/Cache/index
chrome 27922 72u ~/.cache/google-chrome/Default/Cache/data_0
chrome 27922 73u ~/.cache/google-chrome/Default/Cache/data_1
chrome 27922 74u ~/.cache/google-chrome/Default/Cache/data_2
chrome 27922 75u ~/.cache/google-chrome/Default/Cache/data_3
chrome 27922 111u ~/.cache/google-chrome/Default/Cache/f_00001a
Solution 5:
using chromium 11.0.666.0, and flash plug-in 10.2.152
grepping for npviewer did not produce any flash process for me but grepping for flash does:
$ ps x | grep flash
11005 ? Rl 2:30 /usr/lib/chromium-browser/chromium-browser ...
basically same thing as jyap above suggested with
lsof | grep Flash
and you can then proceed as above...