playflash.pet
playflash.pet
I recently came a across a fantastic script from stu90 when I stumbled across this thread:
http://www.murga-linux.com/puppy/viewtopic.php?t=70690
What the script does is it plays youtube videos from Mplayer, instead of the Adobe Flashplayer. This takes up less resources, allowing smoother playback on older machines.
I then decided to package stu90's script into a pet with an icon entry in the Multimedia folder. One can then link the play_flash.desktop file to the desktop or to a quick launch bar.
For this to work, you must have Mplayer installed. ( or Gnome-Mplayer )
Instructions:
1) Launch a youtube video from your favorite browser and pause the video once you see it begins to play.
2) Launch playflash from the menu and the video should open up in Mplayer
- alternatively, you can also type playflash in the terminal
enjoy!
http://www.murga-linux.com/puppy/viewtopic.php?t=70690
What the script does is it plays youtube videos from Mplayer, instead of the Adobe Flashplayer. This takes up less resources, allowing smoother playback on older machines.
I then decided to package stu90's script into a pet with an icon entry in the Multimedia folder. One can then link the play_flash.desktop file to the desktop or to a quick launch bar.
For this to work, you must have Mplayer installed. ( or Gnome-Mplayer )
Instructions:
1) Launch a youtube video from your favorite browser and pause the video once you see it begins to play.
2) Launch playflash from the menu and the video should open up in Mplayer
- alternatively, you can also type playflash in the terminal
enjoy!
- Attachments
-
- playflash.jpg
- playflash in action
- (43.04 KiB) Downloaded 1359 times
-
- playflash.pet
- Play youtube videos in Mplayer
- (2.56 KiB) Downloaded 646 times
Last edited by Tman on Mon 10 Oct 2011, 01:26, edited 1 time in total.
You can also save the video by copying the /proc file, so it's helpful to create a log:
Code: Select all
#!/bin/sh
var="$(stat -c %N /proc/*/fd/* 2>&1|awk -F[\`\'] '/lash/{print$2}')"
echo "$var" >/tmp/flash
mplayer -cache 1000 ${var}
http://groups.google.com/group/gecko-me ... 08c99fe6de
I havent tested it...yet. But it sounds worth of a test.
I havent tested it...yet. But it sounds worth of a test.
pemasu,
Thank you for the link. I run the latest version of SeaMonkey and will give it a try along with removal of flashplayer.
I am curious though as to how it would handle a flash file that tried to run bad code on a PC.
I normally have NoScript, Better Privacy, and ghost as well as flashblock installed in SeaMonkey as addons.
Thank you for the link. I run the latest version of SeaMonkey and will give it a try along with removal of flashplayer.
I am curious though as to how it would handle a flash file that tried to run bad code on a PC.
I normally have NoScript, Better Privacy, and ghost as well as flashblock installed in SeaMonkey as addons.
Could not get FF7 to use itpemasu wrote:http://groups.google.com/group/gecko-me ... 08c99fe6de
I havent tested it...yet. But it sounds worth of a test.
Spup Frugal HD and USB
Root forever!
Root forever!
Found this post when searching more info of that script:
https://github.com/Rob-ot/Youtube-Without-Flash
https://github.com/Rob-ot/Youtube-Without-Flash
Hi Pemasu,pemasu wrote:Found this post when searching more info of that script:
https://github.com/Rob-ot/Youtube-Without-Flash
The readme on there says the script is broken:
At the time of writing this the script is broken, sorry, its been broken for a while actually and I dont have time to hack on it anymore (same old story - finished college, got a fulltime job) so I am hoping by putting it on github you other hackers can apply your ideas and have at it.
If someone out there is interested in being a maintainer email me at dsmlover@gmail.com.
requirements: you must not suck at javascript, you must hate flash
I will also post a branch with my prototype for a full on flash replacing framework I started making although thats probably broken on youtube too.
for me the only reliable method is to run mplayer with the temporary flashfile in /tmp, like /tmp/FlashXxgrdt.
Unfortunately, new flashplayers no longer store it there
As I use opera as defaultbrowser, I placed the NEW flashplayer somewhere like /root/newflash/libflashplayer.so
Then in operas options, in the plugin settings, I have set the pluginpath to /root/newflash/.
To grab videos from youtube, I use firefox with the OLD flashplayer /root/.mozilla/plugins/libflashplayer.so (firefox uses the player there by default, it is version 10,0,15,3).
Like this I have two browsers, one with the new player for sites that need it, and one with the old player.
To view a video now in mplayer, I use the old playflash script I posted here:
http://www.murga-linux.com/puppy/viewtopic.php?t=34008
You'll need this old flashplayer:
http://noforum.de/files/libflashplayer. ... 5.3.tar.gz
Mark
Unfortunately, new flashplayers no longer store it there
As I use opera as defaultbrowser, I placed the NEW flashplayer somewhere like /root/newflash/libflashplayer.so
Then in operas options, in the plugin settings, I have set the pluginpath to /root/newflash/.
To grab videos from youtube, I use firefox with the OLD flashplayer /root/.mozilla/plugins/libflashplayer.so (firefox uses the player there by default, it is version 10,0,15,3).
Like this I have two browsers, one with the new player for sites that need it, and one with the old player.
To view a video now in mplayer, I use the old playflash script I posted here:
http://www.murga-linux.com/puppy/viewtopic.php?t=34008
You'll need this old flashplayer:
http://noforum.de/files/libflashplayer. ... 5.3.tar.gz
Mark
Mu,
I had no idea your playflash.pet existed until today. Same name too .
Perhaps someone would be able to merge code from both playflash pets. We could have a utility that scans the new folder where flashplayer stores its temporary files and have Mplayer launch it.
An on/off function for it would be good as well, so it doesn't constantly scan for videos every few seconds when one isn't using the internet. My coding skills are weak, but I might be able to do this...might
The link that Pemasu posted, is an even better idea, but I wouldn't how to to implement it, as it is beyond my skills.
I had no idea your playflash.pet existed until today. Same name too .
Perhaps someone would be able to merge code from both playflash pets. We could have a utility that scans the new folder where flashplayer stores its temporary files and have Mplayer launch it.
An on/off function for it would be good as well, so it doesn't constantly scan for videos every few seconds when one isn't using the internet. My coding skills are weak, but I might be able to do this...might
The link that Pemasu posted, is an even better idea, but I wouldn't how to to implement it, as it is beyond my skills.
no problem about the name, it was just a simple script, as small utility.
Feel free to use it/extract what you need, and continue it as "playflash".
I'm currently too busy to continue it, so I'm happy if the fragments can help others in newer projects.
I had googled about the topic some weeks ago, and if I remember well, the new flashplayers do no longer store a single flashfile.
The file is splitted in parts, what makes it more difficult to grab it.
I found it too complicated to find out the exact mechanism, and so installed the old flashplayer instead.
Maybe meanwhile people found a solution that can be found with google though
Greets, Mark
Feel free to use it/extract what you need, and continue it as "playflash".
I'm currently too busy to continue it, so I'm happy if the fragments can help others in newer projects.
I had googled about the topic some weeks ago, and if I remember well, the new flashplayers do no longer store a single flashfile.
The file is splitted in parts, what makes it more difficult to grab it.
I found it too complicated to find out the exact mechanism, and so installed the old flashplayer instead.
Maybe meanwhile people found a solution that can be found with google though
Greets, Mark
To save videos I use this script I googled:
So if I call it savevid, run like savevid videoname.
Doesn't work with dailymotion now, as they changed something to stymie!
Code: Select all
#!/usr/bin/env bash
for flashpid in $(pgrep -f flashplayer.so); do
cd "/proc/$flashpid/fd"
for video in $(file * | grep '/tmp/Flash' | sed 's/\(^[0-9]*\).*/\1/g'); do
echo "/proc/$flashpid/fd/$video"
cp "/proc/$flashpid/fd/$video" /mnt/home/vids/$1
done
done
Doesn't work with dailymotion now, as they changed something to stymie!
muggins,
I use a Firefox plugin to save streaming video, but that's a great script for non-Firefox users.
After a bit of googling, I discovered a plugin for Firefox that will allow users to play flash videos with a stand-alone video player. I tried it with Gnome-mplayer, regular Mplayer and VLC. It was a bit slow to react with VLC but worked with all three players You just need to install the plugin and adjust the preferences.
Of course, this only helps Firefox users.
https://addons.mozilla.org/addon/flashvideoreplacer/
I use a Firefox plugin to save streaming video, but that's a great script for non-Firefox users.
Thank you MU, but it may not be necessary for me to continue modifying playflash.MU wrote: Feel free to use it/extract what you need, and continue it as "playflash".
After a bit of googling, I discovered a plugin for Firefox that will allow users to play flash videos with a stand-alone video player. I tried it with Gnome-mplayer, regular Mplayer and VLC. It was a bit slow to react with VLC but worked with all three players You just need to install the plugin and adjust the preferences.
Of course, this only helps Firefox users.
https://addons.mozilla.org/addon/flashvideoreplacer/
- Attachments
-
- FlashVideoReplacer.jpg
- (37.61 KiB) Downloaded 1362 times
I used a slightly different approach by adding a "-c" option to the flash script, where it copies to a designated folder with a date:minute stamp instead of playing it:muggins wrote:To save videos I use this script I googled:
So if I call it savevid, run like savevid videoname.Code: Select all
#!/usr/bin/env bash for flashpid in $(pgrep -f flashplayer.so); do cd "/proc/$flashpid/fd" for video in $(file * | grep '/tmp/Flash' | sed 's/\(^[0-9]*\).*/\1/g'); do echo "/proc/$flashpid/fd/$video" cp "/proc/$flashpid/fd/$video" /mnt/home/vids/$1 done done
Doesn't work with dailymotion now, as they changed something to stymie!
Code: Select all
#!/bin/sh
## USEAGE" [-c] to copy video
DIR="/mnt/sda2/Desktop/myvideos" ## save directory
var="$(stat -c %N /proc/*/fd/* 2>&1|awk -F[\`\'] '/lash/{print$2}')"
echo "$var" >/tmp/flash
[ "$1" ] || sudo mplayer -cache 1000 ${var}
## Log only working file in /tmp/flash
while read line; do
var="$(ls -l ${line} 2>/dev/null | grep "Flash")"
if [ ! "$var" ]; then
dl="$( echo ${line} | cut -d/ -f3)"
sed -i "/$dl/d" /tmp/flash
fi
done </tmp/flash
if [ "$1" == "-c" ]; then
nm="$(date +%d-%m-%y:%M)"
cp `cat /tmp/flash` "${DIR}/${nm}.vid"
fi
Earlier, I recommended the FlashVideoReplacer plugin for Firefox but after using it to watch Youtube videos for a while, I found that sometimes it would skip and once in a while there would be problems with the video blacking out. So overall, I think that using playflash gives smoother playback.
FYI, one can alter the script for use with gnome-mplayer as well.
FYI, one can alter the script for use with gnome-mplayer as well.