You are not logged in.
Pages: 1
Before I updated flash I could easily play flash videos, which have been downloaded by flash itself by playing /tmp/Flash*, but now they're gone. Kind of. :]
Fortunately we've got nice utilities to track flash's evil works.
s|~ % lsof | grep Flash
plugin-co 25067 s 18u REG 254,1 12353915 212607 /tmp/FlashXXIxfnki (deleted)
plugin-co 25067 25069 s 18u REG 254,1 12353915 212607 /tmp/FlashXXIxfnki (deleted)
# and couple more of similar records
They're writing it in a deleted file! They bastards!
Scj in IRC pointed me out that there's /proc, which I can use to peak at plugin-container's fds and so I did... So we do this:
alias f="mplayer /proc/\$(pidof plugin-container)/fd/\$(ls -l /proc/\$(pidof plugin-container)/fd | grep Flash | pcregrep -o '[0-9]+(?= ->)')"
Put this in .{zshrc,bashrc,whatever} and hurray! — feel like you've outsmarted adobe!
NOTE: may not work, if you've got more than one video there. :]
Last edited by sie (2011-03-09 10:20:29)
a & ☭
Offline
mplayer $(d=/proc/$(pidof plugin-container)/fd; ls --color=no -l $d | gawk '/\/tmp\/Flash/ {print "'$d'/" $9}' )
Will work if you have more than one flash movie loaded.
Offline
Hah, I wondered what happened to my /tmp/Flash files. Fixed. Beat flash. Thanks a lot, wouldn't have figured that out. flash () { cp $(what you said) flash.flv } . And done. Should maybe pipe it to a converter to really outsmart adobe, but meh. For conkeror, plugin-container=xulrunner-bin, for those looking.
Offline
Amazing! It doesn't work when there are multiple plugin-container processes though. Isn't that expected to happen when there are multiple Flash plugins open?
Offline
It seems that for webkit browsers it runs under the browser name itself:
$ lsof | grep Flash
plugin-co 15812 chris 17u REG 8,3 25246995 408785 /tmp/FlashXX2p80Ou (deleted)
...
luakit 30544 chris 32u REG 8,3 26746417 408783 /tmp/FlashXXWnVzYf (deleted)
...
midori 30777 chris 67u REG 8,3 21056134 408784 /tmp/FlashXXgSdtCK (deleted)
...
Thats firefox, luakit and midori all playing one instance of flash each.
Also, personally I prefer to have a function that just returns a list of files:
flashfiles() {
local pids=( $(pidof plugin-container xulrunner-bin luakit midori whateverwebkitbrowseryouuse ) )
for pid in ${pids[@]}; do
stat --format='%N' /proc/${pid}/fd/* | sed -n '/Flash/ s@`\([[:alnum:]/]*\).*@\1@p'
done
}
... then you can do whatever you want with it:
$ mplayer $(flashfiles)
...
$ cp $(flashfiles) /some/dir/
Offline
This doesn't work here... I first tried it with luakit, but the problem of that was mentioned. So I opened it in Firefox. My link is http://videos.arte.tv/de/videos/die_wol … 72992.html. I opened it in Firefox (version 4) and the video is running now. But there's no output of the command lsof | grep Flash. I don't know what's wrong here... Does this only work for Firefox (version 3)?
Last edited by Army (2011-03-23 08:27:45)
Offline
i personally don't use multiple browsers to watch flash videos so checking multiple commands is pointless for me.
hence, with ideas from quigybo (your version didn't quite work for me for some reason) and some gawk from scj, this is my simple way of playing all flash files for a single browser:
ZSH:
for f (${$(file /proc/$(pidof luakit)/fd/*|gawk '/\/tmp\/Flash/ {print $1}')//:}){mplayer $f}
BASH:
for f in $(file /proc/$(pidof luakit)/fd/*|gawk '/\/tmp\/Flash/ {print $1}'); do mplayer ${f%:}; done
similar bash version included for completeness though i personally don't use it.
if you use `echo' instead of `mplayer' you just get a list, and it should be easy enough to create a simple function for renaming/moving them or whatever.
this works for me so could possibly work and/or be another alternative for someone else... just throwing mine into the pile.
Offline
This doesn't work here... I first tried it with luakit, but the problem of that was mentioned. So I opened it in Firefox. My link is http://videos.arte.tv/de/videos/die_wol … 72992.html. I opened it in Firefox (version 4) and the video is running now. But there's no output of the command lsof | grep Flash. I don't know what's wrong here... Does this only work for Firefox (version 3)?
Ok, seems like this method simply doesn't always work. Maybe there's a solution for sites like this one (arte.tv)?
Offline
Isn't there a better approach?
It should be surely possible to remove the deleted-marking again. But how?
There could be a inotify based daemon that goes into the /proc/flash-pid/fd and unmarks any deleted files...
฿ 18PRsqbZCrwPUrVnJe1BZvza7bwSDbpxZz
Offline
This works with multiple plugin-container processes for me:
#!/bin/sh
# Play flash videos in mplayer
# https://bbs.archlinux.org/viewtopic.php?pid=901228#p901228
# The original: works only when there is only one plugin-container process
# mplayer $(d=/proc/$(pidof plugin-container)/fd; ls --color=no -l $d | gawk '/\/tmp\/Flash/ {print "'$d'/" $9}' )
videos=
for pid in $(pidof plugin-container)
do
d=/proc/$pid/fd
videos="$videos $(ls --color=no -l $d | gawk '/\/tmp\/Flash/ {print "'$d'/" $9}')"
done
if [ "$videos" ]
then
mplayer $videos
else
echo 'No Flash is loaded'
exit 1
fi
Offline
https://code.google.com/p/get-flash-videos
http://aur.archlinux.org/packages.php?K … ash_videos
Last edited by Wintervenom (2011-03-26 07:25:31)
Offline
I think this works by scraping the video source URL from the web page, so it requires code to be written for each of the many types of Flash video players to work. Something similar is the Video5 Chrome extension, for which I contributed some code. On the other hand the method in topic should work for most Flash players that download videos to a file while playing them.
Offline
Maybe there's a solution for sites like this one (arte.tv)?
arte.tv uses RTMP, so there's no video saved. get-flash-videos supports arte.tv though. (And some other RTMP-sites)
Offline
Army wrote:Maybe there's a solution for sites like this one (arte.tv)?
arte.tv uses RTMP, so there's no video saved. get-flash-videos supports arte.tv though. (And some other RTMP-sites)
Now there even is a package in the AUR called artevideos, really a great script, which provides playback with mplayer (and other players) and recording (saving the stream).
Offline
every command mentioned above does exactly nothing here... the lsof command shows me some npviewer. processes, but replacing plugin-container with npviewer. does nothing
*edit*
k... with flash-prerelease i can get it to work
Last edited by Rasi (2011-03-27 15:15:34)
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
Pages: 1