Posted by: Odzangba | October 18, 2011

How To Download Flash Videos On Ubuntu 11.04

It seems Adobe is on a mission to make downloading Flash videos as difficult as possible for those of us used to grabbing them from /tmp. A few weeks ago, I noticed Flash videos were no longer being saved in the /tmp directory. Instead, they were being placed in the browser’s cache folder… minor inconvenience, life goes on. After a recent update however, the files  are no longer being saved in the cache folder. A quick

lsof | grep -i flash

gave me:

plugin-co 26044          o   17u      REG        8,1  2020248     393786 /tmp/FlashXXxaK1Jq (deleted)

You guessed it… there is no file called FlashXXxaK1Jq in the /tmp directory. I see what you did there Adobe, nice one. I’ll spare you most of the technical details but the output indicates that the file is somewhere in the /proc directory. Using the process id 26044 (the second field in the output of the lsof command), we can hunt down the file FlashXXxaK1Jq in the /proc directory. So:

cd /proc/26044/fd ; ls -l | grep FlashXXxaK1Jq

will give you something like:

lrwx------ 1 o o 64 2011-10-18 10:30 17 -> /tmp/FlashXXxaK1Jq (deleted)

So the flash video is named 17 and being symlinked in a sneaky manner to /tmp/FlashXXxaK1Jq (deleted). Now do something like:

cp 17 ~/Videos/funny-youtube-video.flv

and you’re done. Go back to your Videos folder and watch that cat playing the piano to your heart’s content.

And now, I must cover my tuchis so here goes… downloading copyrighted material may be illegal where you live.


Responses

  1. Great stuff. Took a bit of effort to find since Google would always come up with the out of date information about the /tmp/ directory before I went into advanced search..

    I tried it using the Opera browser which might account for my slightly different results. I found that the call to lsof worked less confusingly if I did this:

    lsof | grep Flash

    It gives about 9 lines with the correct PID which led me to finding the correct /proc/ directory. The suggested lsof call gave rather more abundant and less useful output.

    Thanks

    Z

  2. Wow! worked like charm. Thank u very much

  3. Yar.. Very good tip. Thanks a lot..

  4. As a Group working in the African music industry “How To Download Flash Videos On Ubuntu 11.04 Odzangba Kafui Dake” is right up our street and we will keep checking for interesting additions to your post. If you want to know more about Ghana Music Videos visit us at %URL% … Well written, thank you🙂

  5. Tthis script will copy the file to your home directory and name the file video.flv:

    d=`lsof | grep “\/tmp\/Flash”`
    pid=`echo $d | cut -d’ ‘ -f2`
    file=`echo $d | cut -d’ ‘ -f9`
    cd /proc/$pid/fd
    d=`ls -l | grep $file`
    fd=`echo $d | cut -d’ ‘ -f8`
    cp $fd ~/video.flv

  6. thank u very much.. i’ve been searching solution way ago tried something else like downloaded clipgrab,etc but this works fine thank u..

  7. Hey can you please update this… it no longer seems to work….

  8. ops still works great🙂 sorry about false alarm.

  9. I’m running flash version 11.2.202.233 on firefox, downloaded youtube video
    this is what I get when I run cmd
    alpha@nzxt:~$ lsof | grep -i flash
    plugin-co 3180 alpha mem REG 8,5 19216752 1193786 /usr/lib/flashplugin-installer/libflashplayer.so
    alpha@nzxt:~$ cd /proc/3180/fd
    alpha@nzxt:/proc/3180/fd$ ls -l
    total 0
    lr-x—— 1 alpha alpha 64 2012-04-22 07:43 0 -> /dev/null
    lrwx—— 1 alpha alpha 64 2012-04-22 07:43 1 -> /home/alpha/.xsession-errors
    l-wx—— 1 alpha alpha 64 2012-04-22 07:43 10 -> socket:[32022]
    lrwx—— 1 alpha alpha 64 2012-04-22 07:43 11 -> socket:[32023]
    lrwx—— 1 alpha alpha 64 2012-04-22 07:43 12 -> pipe:[32024]
    lr-x—— 1 alpha alpha 64 2012-04-22 07:43 13 -> pipe:[32024]
    l-wx—— 1 alpha alpha 64 2012-04-22 07:43 14 -> socket:[18050]
    lrwx—— 1 alpha alpha 64 2012-04-22 07:43 15 -> /home/alpha/.mozilla/firefox/qp0z81nf.default/cert8.db
    lrwx—— 1 alpha alpha 64 2012-04-22 07:43 16 -> /home/alpha/.mozilla/firefox/qp0z81nf.default/key3.db
    l-wx—— 1 alpha alpha 64 2012-04-22 07:43 17 -> /dev/nvidiactl
    lrwx—— 1 alpha alpha 64 2012-04-22 07:43 18 -> /dev/nvidia0
    lrwx—— 1 alpha alpha 64 2012-04-22 07:43 19 -> /dev/nvidia0
    lrwx—— 1 alpha alpha 64 2012-04-22 07:43 2 -> /home/alpha/.xsession-errors
    lrwx—— 1 alpha alpha 64 2012-04-22 07:43 20 -> /dev/nvidia0
    lr-x—— 1 alpha alpha 64 2012-04-22 07:43 21 -> /dev/nvidia0
    l-wx—— 1 alpha alpha 64 2012-04-22 07:43 22 -> /dev/nvidia0
    lr-x—— 1 alpha alpha 64 2012-04-22 07:43 23 -> /dev/nvidia0
    l-wx—— 1 alpha alpha 64 2012-04-22 07:43 24 -> /dev/nvidia0
    lrwx—— 1 alpha alpha 64 2012-04-22 07:43 25 -> /dev/nvidia0
    lr-x—— 1 alpha alpha 64 2012-04-22 07:43 26 -> /dev/nvidia0
    l-wx—— 1 alpha alpha 64 2012-04-22 07:43 27 -> /dev/nvidia0
    lrwx—— 1 alpha alpha 64 2012-04-22 07:43 28 -> /dev/nvidia0
    lr-x—— 1 alpha alpha 64 2012-04-22 07:43 29 -> /dev/nvidia0
    lrwx—— 1 alpha alpha 64 2012-04-22 07:43 3 -> socket:[30026]
    lr-x—— 1 alpha alpha 64 2012-04-22 07:43 30 -> /dev/nvidia0
    l-wx—— 1 alpha alpha 64 2012-04-22 07:43 31 -> /dev/nvidia0
    lr-x—— 1 alpha alpha 64 2012-04-22 07:43 32 -> socket:[66660]
    lrwx—— 1 alpha alpha 64 2012-04-22 07:43 33 -> anon_inode:inotify
    lrwx—— 1 alpha alpha 64 2012-04-22 07:43 4 -> socket:[30027]
    lr-x—— 1 alpha alpha 64 2012-04-22 07:43 5 -> pipe:[18046]
    l-wx—— 1 alpha alpha 64 2012-04-22 07:43 6 -> pipe:[18046]
    lr-x—— 1 alpha alpha 64 2012-04-22 07:43 7 -> pipe:[18047]
    l-wx—— 1 alpha alpha 64 2012-04-22 07:43 8 -> pipe:[18047]
    lr-x—— 1 alpha alpha 64 2012-04-22 07:43 9 -> anon_inode:[eventpoll]

    earlier versions of flash gave # instead of mem
    how do I tell which to cp and location of file

  10. […] kb9rlw.blogspot.dk/2011/11/download-any-flash-video-you-can-view odzangba.wordpress.com/2011/10/18/how-to-download-flash-videos-on-ubuntu-11-04 ikacikax.wordpress.com/2011/03/06/where-are-chromes-flash-temporary-files-ubuntu […]

  11. I managed to download a video using your post, thanx!

    If anybody is interested….

    Following the post, I went to /proc/PID number

    I played the video in chrome, so while buffering I checked the PID from chrome task manager (stats for nerds) and I showed two processes, one for the website that contained the video and other for Shockwave Flash (Peeper Video). Actually the video was being caching in the Shockwave Flash PID (in this case, 2456)

    so I found the video in /proc/2456/fd

    I saw that there was a file increasing size up to 362 Mb

    22 -> /home/USER/.config/google-chrome/Default/Peeper Data/Schowave Flash/.com.google.Chrome.5Whwm1 (deleted)

    after the buffering was over, I simply copied it to my Desktop

    $ sudo cp -pv /proc/2456/fd/22 ~/Desktop/video.flv


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: