New location of Flash videos for Adobe Flash Player 10.2

Discussions Regarding Software

Moderator: Moderators

Post Reply
Fitzcarraldo
Sagely Hen
Posts: 8218
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom
Contact:

New location of Flash videos for Adobe Flash Player 10.2

Post by Fitzcarraldo » Sun Oct 10, 2010 18:24

EDIT (October 27, 2010 10:20 BST): Moved to 'Software in General' Forum as it applies to both 64-bit and 32-bit editions of Sabayon Linux.
-----------------------------------------------------------------------------------

With the old 10.1 version of Adobe's 64-bit Flash Player, the videos were cached in the /tmp directory as Flash* files. If I wanted to keep a copy of the video I used to copy the temporary file to my home directory and append ".flv".

The new Flash Player 10.2 works fine in my 64-bit SL installation but the place where the video is cached has changed.

Here's how to access the streaming Flash file so that you can save it to play later using you favourite media player:

1. Install sys-process/lsof if it's not already installed.

2.Use the command lsof | grep Flash

Code: Select all

$ lsof | grep Flash
plugin-co 8559            fitzcarraldo   17u      REG                8,6 153846933  660934 /tmp/FlashXXLk35dx (deleted)
plugin-co 8559 8560       fitzcarraldo   17u      REG                8,6 153846933  660934 /tmp/FlashXXLk35dx (deleted)
plugin-co 8559 8564       fitzcarraldo   17u      REG                8,6 153846933  660934 /tmp/FlashXXLk35dx (deleted)
plugin-co 8559 8565       fitzcarraldo   17u      REG                8,6 153846933  660934 /tmp/FlashXXLk35dx (deleted)
plugin-co 8559 8566       fitzcarraldo   17u      REG                8,6 153846933  660934 /tmp/FlashXXLk35dx (deleted)
plugin-co 8559 8567       fitzcarraldo   17u      REG                8,6 153846933  660934 /tmp/FlashXXLk35dx (deleted)
plugin-co 8559 8568       fitzcarraldo   17u      REG                8,6 153846933  660934 /tmp/FlashXXLk35dx (deleted)
plugin-co 8559 8569       fitzcarraldo   17u      REG                8,6 153846933  660934 /tmp/FlashXXLk35dx (deleted)
plugin-co 8559 8570       fitzcarraldo   17u      REG                8,6 153846933  660934 /tmp/FlashXXLk35dx (deleted)
plugin-co 8559 8571       fitzcarraldo   17u      REG                8,6 153846933  660934 /tmp/FlashXXLk35dx (deleted)
plugin-co 8559 8572       fitzcarraldo   17u      REG                8,6 153846933  660934 /tmp/FlashXXLk35dx (deleted)
plugin-co 8559 8574       fitzcarraldo   17u      REG                8,6 153846933  660934 /tmp/FlashXXLk35dx (deleted)
plugin-co 8559 8576       fitzcarraldo   17u      REG                8,6 153846933  660934 /tmp/FlashXXLk35dx (deleted)
plugin-co 8559 8577       fitzcarraldo   17u      REG                8,6 153846933  660934 /tmp/FlashXXLk35dx (deleted)
plugin-co 8559 8578       fitzcarraldo   17u      REG                8,6 153846933  660934 /tmp/FlashXXLk35dx (deleted)
plugin-co 8559 8579       fitzcarraldo   17u      REG                8,6 153846933  660934 /tmp/FlashXXLk35dx (deleted)
plugin-co 8559 8580       fitzcarraldo   17u      REG                8,6 153846933  660934 /tmp/FlashXXLk35dx (deleted)
plugin-co 8559 8581       fitzcarraldo   17u      REG                8,6 153846933  660934 /tmp/FlashXXLk35dx (deleted)
plugin-co 8559 8582       fitzcarraldo   17u      REG                8,6 153846933  660934 /tmp/FlashXXLk35dx (deleted)
plugin-co 8559 8583       fitzcarraldo   17u      REG                8,6 153846933  660934 /tmp/FlashXXLk35dx (deleted)
plugin-co 8559 8584       fitzcarraldo   17u      REG                8,6 153846933  660934 /tmp/FlashXXLk35dx (deleted)
plugin-co 8559 8585       fitzcarraldo   17u      REG                8,6 153846933  660934 /tmp/FlashXXLk35dx (deleted)
The second column shows the PID (8559 in the above example), and the fifth column has the file descriptor number (17 in the above example). To access the file in the /proc file system using these, you just need to do the following:

Code: Select all

$ cp /proc/8559/fd/17 ~/The_History_of_Hang_Gliding.flv
I have not looked on a 32-bit SL installation, but I wouldn't be surprised if the same thing applied.

Fac3kk
Simple Hen
Posts: 67
Joined: Fri Oct 16, 2009 16:26

Re: New location of Flash videos for Adobe Flash Player 10.2

Post by Fac3kk » Sun Oct 10, 2010 19:29

Fitzcarraldo wrote:I have not looked on a 32-bit SL installation, but I wouldn't be surprised if the same thing applied.
It does, thanks! :)

User avatar
amoebios
Growing Hen
Posts: 168
Joined: Wed Dec 03, 2008 22:25
Contact:

Re: New location of Flash videos for Adobe Flash Player 10.2

Post by amoebios » Sun Oct 10, 2010 22:07

i used the search. A bit slower, but gets you there, too. :)

svantoviit
Old Dear Hen
Posts: 757
Joined: Sun Feb 28, 2010 17:55
Contact:

Re: New location of Flash videos for Adobe Flash Player 10.2

Post by svantoviit » Sun Oct 10, 2010 22:13

When using Firefox it stores the flash-videos in the Cache folder now...

Code: Select all

~/.mozilla/firefox/"userprofile.default"/Cache
The name of the "userprofile" folder differs probably with each user.
But your approach, Fitzcarraldo, is really universal, thank you!

Fitzcarraldo
Sagely Hen
Posts: 8218
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom
Contact:

Re: New location of Flash videos for Adobe Flash Player 10.2

Post by Fitzcarraldo » Mon Oct 25, 2010 1:59

There is a more elegant way of saving Flash videos in the case of YouTube: use the Python script youtube-dl (see http://bitbucket.org/rg3/youtube-dl/wiki/Home for details).

For example, I wanted to download the YouTube video http://www.youtube.com/watch?v=S5wGCVhE9XU so I just entered the following command under my own user account:

Code: Select all

youtube-dl -o Horten_Ho_229_documentary_1_of_5.flv http://www.youtube.com/watch?v=S5wGCVhE9XU
I don't even need to watch the video; the youtube-dl script just downloads the full Flash video file:

Code: Select all

$ youtube-dl -o Horten_Ho_229_documentary_1_of_5.flv http://www.youtube.com/watch?v=S5wGCVhE9XU
[youtube] Setting language
[youtube] S5wGCVhE9XU: Downloading video webpage
[youtube] S5wGCVhE9XU: Downloading video info webpage
[youtube] S5wGCVhE9XU: Extracting video information
[download] Destination: Horten_Ho_229_documentary_1_of_5.flv
[download] 100.0% of 29.36M at   72.00k/s ETA 00:00
$

Code: Select all

youtube-dl --help
lists all the options for the script. Excellent utility.

DHalens
Old Dear Hen
Posts: 933
Joined: Thu Apr 10, 2008 23:08
Location: Canary Islands, Spain

Re: New location of Flash videos for Adobe Flash Player 10.2

Post by DHalens » Mon Oct 25, 2010 15:24

Very useful for scripting but for downloading youtube videos I just watched and liked, I prefer this extension (needs greasemonkey on firefox): http://userscripts.org/scripts/show/62634
Former Sabayon staff (retired).
For any personal questions or whatever, contact me trough my G+ profile

User avatar
amoebios
Growing Hen
Posts: 168
Joined: Wed Dec 03, 2008 22:25
Contact:

Re: New location of Flash videos for Adobe Flash Player 10.2

Post by amoebios » Mon Oct 25, 2010 20:36

While we're going off-topic; i use the Ant.com Video Downloader for Firefox. It even includes a player!


(Edit: It basically does what all scripts do, but with a graphical menu in your browser. All you need to do is click.)
Last edited by amoebios on Wed Oct 27, 2010 18:57, edited 2 times in total.

svantoviit
Old Dear Hen
Posts: 757
Joined: Sun Feb 28, 2010 17:55
Contact:

Re: New location of Flash videos for Adobe Flash Player 10.2

Post by svantoviit » Mon Oct 25, 2010 23:43

You can play youtube vids even from command line using youtube-pl :wink:
Last edited by svantoviit on Tue Oct 26, 2010 9:52, edited 1 time in total.

Fitzcarraldo
Sagely Hen
Posts: 8218
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom
Contact:

Re: New location of Flash videos for Adobe Flash Player 10.2

Post by Fitzcarraldo » Tue Oct 26, 2010 9:12

It's cool, isn't it? I like these kinds of command-line utilities.

youtube-dl is really useful if you want to download a multi-part video but you don't want to sit through watching it all on YouTube first. For example, a couple of days ago I wanted to download a TV documentary that had been split into five videos on YouTube. I didn't need to watch them all first in Firefox and then save the Flash cache for each one; all I needed to do was enter the following five commands:

Code: Select all

youtube-dl -o Horten_Ho_229_documentary_1_of_5.flv http://www.youtube.com/watch?v=S5wGCVhE9XU
youtube-dl -o Horten_Ho_229_documentary_2_of_5.flv http://www.youtube.com/watch?v=AhAZ3i2DA-o
youtube-dl -o Horten_Ho_229_documentary_3_of_5.flv http://www.youtube.com/watch?v=DXxwKVkbcNw
youtube-dl -o Horten_Ho_229_documentary_4_of_5.flv http://www.youtube.com/watch?v=HzAjwy-S4QU
youtube-dl -o Horten_Ho_229_documentary_5_of_5.flv http://www.youtube.com/watch?v=E9R1xsoysfs
No need to sit through 50 minutes or whatever of video in a Firefox window first. Horses for courses, as they say.

(Interesting documentary, BTW.)

Fitzcarraldo
Sagely Hen
Posts: 8218
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom
Contact:

Re: New location of Flash videos for Adobe Flash Player 10.2

Post by Fitzcarraldo » Tue Oct 26, 2010 13:21

svantoviit wrote:You can play youtube vids even from command line using youtube-pl :wink:
Just tried it: it works nicely, too. Actually, despite the instructions on that Web site, it is not necessary to give youtube-pl root user priviledges. I just did the following to download the script, make it executable and run it:

Code: Select all

[email protected] ~ $ cd Desktop/
[email protected] ~/Desktop $ wget http://ronja.twibright.com/utils/youtube-pl
--2010-10-26 13:17:25--  http://ronja.twibright.com/utils/youtube-pl
Resolving ronja.twibright.com... 83.246.72.181
Connecting to ronja.twibright.com|83.246.72.181|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 78801 (77K) [text/plain]
Saving to: `youtube-pl'

100%[============================================================================================================================================>] 78,801       151K/s   in 0.5s    

2010-10-26 13:17:25 (151 KB/s) - `youtube-pl' saved [78801/78801]

[email protected] ~/Desktop $ chmod +x youtube-pl
[email protected] ~/Desktop $ ./youtube-pl http://www.youtube.com/watch?v=GEFVeVC2zrc
[youtube] Setting language
[youtube] GEFVeVC2zrc: Downloading video webpage
[youtube] GEFVeVC2zrc: Downloading video info webpage
[youtube] GEFVeVC2zrc: Extracting video information
[download] Destination: GEFVeVC2zrc.flv
[download]   0.0% of 7.40M at   68.78k/s ETA 01:50MPlayer SVN-r30554-4.4.2 (C) 2000-2010 MPlayer Team
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing -.
Reading from stdin...
Cache fill:  0.75% (24576 bytes)   27k/s ETA 00:36
[download]   0.8% of 7.40M at  276.24k/s ETA 00:27libavformat file format detected.
[download]   1.7% of 7.40M at  331.75k/s ETA 00:22[flv @ 0x13ae370]Estimating duration from bitrate, this may be inaccurate
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (aac), -aid 0
VIDEO:  [H264]  400x226  0bpp  25.000 fps  330.8 kbps (40.4 kbyte/s)
Clip info:
 duration: 144
 starttime: 0
 totalduration: 144
 width: 400
 height: 226
 videodatarate: 323
 audiodatarate: 99
 totaldatarate: 430
 framerate: 25
 bytelength: 7759807
 canseekontime: true
 sourcedata: BADC20043MM1288095463245651
 purl: 
 pmsg: 
[download]   3.4% of 7.40M at  367.21k/s ETA 00:19==========================================================================
[download]   6.7% of 7.40M at  386.81k/s ETA 00:18Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
==========================================================================
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
AUDIO: 44100 Hz, 2 ch, s16le, 101.9 kbit/7.22% (ratio: 12733->176400)
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
AO: [oss] 44100Hz 2ch s16le (2 bytes per sample)
Starting playback...
Movie-Aspect is 1.77:1 - prescaling to correct movie aspect.
VO: [xv] 400x226 => 400x226 Planar YV12  [fs]
[download] 100.0% of 7.40M at   67.64k/s ETA 00:00 %  0%  1.0% 0 0 48% 
A: 144.0 V: 144.0 A-V:  0.001 ct:  0.023   0/  0  3%  0%  1.0% 0 0 0% 

Exiting... (End of file)
[email protected] ~/Desktop $ 
It runs full-screen.

BTW, I notice that youtube-pl was created from youtube-dl.

Post Reply