Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 22 Dec 2014, 15:31
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
playflash (mediaplayer instead slow player in your browser)
Moderators: deshlab, Flash, GuestToo, Ian, JohnMurga, Lobster
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 2 [26 Posts]   Goto page: 1, 2 Next
Author Message
MU


Joined: 24 Aug 2005
Posts: 13644
Location: Karlsruhe, Germany

PostPosted: Thu 02 Oct 2008, 09:55    Post subject:  playflash (mediaplayer instead slow player in your browser)
Subject description: works with youtube
 

Flash movies embedded in webpages often are very slow, as these players do not support hardware accelleration.
So you might prefer, to see them in your mediaplayer.

This is a very small script, that is placed in /root/Startup/ and (/root/autostart for Muppy).

You must restart X or click on it to activate it.

It scans /tmp/ every 5 seconds for a Flash* file.
If it is detected, your mediaplayer is run with this file.

Default player is mplayer, if that is not available, gxine is used.
You can edit the script to set another defaultplayer.

To test it:
visit:
http://www.golem.de/0809/62664.html

Click on the embedded Video to start it.
Click on the stop-icon, to stop it.
Now it will be buffered, but it is not shown in the slow player.
Wait 5 seconds, and your mediaplayer should start and show it.

Mark
playflash.pet
Description 
pet

 Download 
Filename  playflash.pet 
Filesize  569 Bytes 
Downloaded  1575 Time(s) 

_________________
my recommended links
Back to top
View user's profile Send private message Visit poster's website 
mikeb


Joined: 23 Nov 2006
Posts: 9067

PostPosted: Thu 02 Oct 2008, 12:51    Post subject:  

Hmm good old trick is that one....I wonder perhaps you could add function to give a 'save as' option too...seems like a popular request...and as a script would remain very lightweight.


mike
Back to top
View user's profile Send private message 
magerlab

Joined: 08 Jul 2007
Posts: 731

PostPosted: Fri 03 Oct 2008, 14:25    Post subject:  

thak you Mark!
i also see that i can see that video is in /temp Very Happy
will 5 sec interval affect cpu of old machines?

_________________
skype: desafimager
Back to top
View user's profile Send private message 
MU


Joined: 24 Aug 2005
Posts: 13644
Location: Karlsruhe, Germany

PostPosted: Sat 04 Oct 2008, 05:49    Post subject:  

no, 5 seconds should be ok.
To check it, type in a console:
top

That displays the running programs sorted by cpu-usage.


---------------------
A save-option could be done, it could be a good exercise for people who want to learn writing tools with bash and Xdialog.
I'm too busy at moment to write it on my own.

Mark

_________________
my recommended links
Back to top
View user's profile Send private message Visit poster's website 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11183
Location: Arizona USA

PostPosted: Sun 26 Oct 2008, 22:17    Post subject:  

I installed the .pet, then discovered that if I pause a youtube video while it is playing, it will continue to load into /tmp and the Flash file in /tmp will play in gxine when I click it. It seems that I have to either delete it from /tmp or move it somewhere else before the next one will save in /tmp.
Back to top
View user's profile Send private message 
John Doe

Joined: 01 Aug 2005
Posts: 1689
Location: Michigan, US

PostPosted: Mon 27 Oct 2008, 00:44    Post subject:  

regarding 5 seconds: perhaps 5 seconds isn't enough time to buffer on slower server streams and/or client connections...

this is a cool idea MU but a couple thoughts regarding potential problems that will arise.

1-not every flash file that lands in /tmp is desired media. there are menus, ads and other "site parts" written in flash. these will launch also.

2-even if there is only one flash object on the page that is desired media, it will most likely also auto play in the browser flash plug-in. with both playing, it would overload an older machine (900mhz, like I'm on) for sure.

my thoughts on a "perfect solution" for the problem you are trying to solve.

a custom moz plugin that displays a standard gui with three options:

1-save as
2-play
3-display

internally the plugin would function as follows:

1 - ask for location and output the binary stream there

2 - dump binary stream as unique file name to /tmp and launch 'defaultmediaplayer' with said unique file name.

3 - unload itself and load flash player plugin for display (good for site menus or sites in 100% flash). I don't even know if this is possible, just saying how it could be easily accomplished.


in closing...
UP YOURS ADOBE!!!! I'm sick of your crappy plugin!!
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4427

PostPosted: Mon 27 Oct 2008, 01:20    Post subject:  

...or maybe couple this with the Flashblock plugin for some real speed?
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 9067

PostPosted: Mon 27 Oct 2008, 10:54    Post subject:  

Flash has to be loaded as it is this that downloads the flv not the browser directly....usually as a randomly named file..so blocking flashplayer won't work.

This will continue until it is complete or the page is navigated away from.

Perhaps a better way to detect would be to locate the file in temp that is steadily growing... (unless mu is already doing that)...

I will have a play with this

mike

edit..alternative approach
http://bashscripts.org/viewtopic.php?t=210
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 9067

PostPosted: Mon 27 Oct 2008, 13:39    Post subject:  

Ok that link is a little out of date....
here and updated version...given the you tube url it downloads the flv and plays it with a media player...flash player not needed....something to chew on

mike

Code:
#!/bin/bash

wget -c -S -O tmp.flv `curl -s $1 | grep swfArgs | awk '{print $7 "get_video?video_id=" $11 "&t=" $19}' | tr -d '",'` &

vlc tmp.flv
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4427

PostPosted: Mon 27 Oct 2008, 16:22    Post subject:  

@mikeb vlc --> gxine (in the posted code) for default puppy?

@all - This might be a perfect addition to FirePup
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 9067

PostPosted: Mon 27 Oct 2008, 17:53    Post subject:  

Just a serving suggestion.....a dialog could be added.....vlc can be gmplayer/gxine etc.

By the way it seems that if &fmt=18 is added to the url then the original video is downloaded.

mike
edit
hmm...seems like www.youtube.com rejects curl but uk.youtube.com works

I used dfa=`echo $dfa | sed 's/www/uk/'` where dfa = address to work round this.
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 9067

PostPosted: Wed 29 Oct 2008, 12:40    Post subject:  

Ok..still with the topic i hope...

I made a simple script to test loading/playing vids from youtube .
Also does straight downloads too....plus the 'you tube(s)' button tries to download the original movie...usually mp4 format ....there is the option to play the download with default player.

Now combining this with a browser rather than copying and pasting links would be neat step.

have fun

mike

not happy with sleep being used to buffer the start but works for test.

Edit :- Ok seems you tube have added an ad into the url string so here's an updated version. By the way I am using the uk url rather than us as www returns nothing wuth curl (?!!)
YouTubeTest_v2.tar.gz
Description 
gz

 Download 
Filename  YouTubeTest_v2.tar.gz 
Filesize  997 Bytes 
Downloaded  577 Time(s) 
Back to top
View user's profile Send private message 
E2001


Joined: 12 Dec 2008
Posts: 45

PostPosted: Sat 13 Dec 2008, 14:26    Post subject:  

I'm not trying to to rain on anyone's parade, but...

If you use firefox as your browser, there are many plugins that allow you to download embedded media. I use one called: Video DownloadHelper. It can extract pretty much anything. Not automatic, tho.

Sorry if I missed the point.
Back to top
View user's profile Send private message 
stifiling

Joined: 29 Dec 2007
Posts: 388

PostPosted: Wed 16 Sep 2009, 16:14    Post subject:  

does this still work? was able to get it to go before, now it's not on 4.1.3
Back to top
View user's profile Send private message 
swiatmar


Joined: 09 Aug 2008
Posts: 241
Location: Danube, AT

PostPosted: Sat 24 Oct 2009, 20:43    Post subject:  

Hi!!

I don't really know why, but it doesn't work on my computer. I have installed this pet and somehow nothing is happening. I am running puppy 4.2
regards
mar
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 2 [26 Posts]   Goto page: 1, 2 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Unsorted
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0810s ][ Queries: 12 (0.0074s) ][ GZIP on ]