Grab screenshot from swf.
#1
Posted 24 December 2008 - 08:07 AM
I was wondering is there a way to get a screenshot from swf file with php?
I was looking for a solution with ffmpeg, but there is option only for .flv file.
I'm open for any suggestions.
#2
Posted 24 December 2008 - 08:11 AM
I'd have to guess on No since Flash runs Client-Side. PHP is server-side.
I also can't think of a any great solution to do this automatically besides PHP. Stick to manual for now.
Sry mate
B
#3
Posted 24 December 2008 - 10:55 AM
There is a special functions for swf in php, but most of them are using to create swf with php.
http://bg.php.net/swf
Edited by Pr0oF, 24 December 2008 - 10:56 AM.
#4
Posted 24 December 2008 - 06:43 PM
Consider a Flash game website where a Mario game is hosted, next to it, there's a screenshot of Mario jumping over a turtle (as he does)
Then consider using PHP, do you think:
1. there's a PHP script that has such a long execution time to wait until Mario jumps over a turtle
2. PHP waits for an intro in a Flash animation
3. there's a PHP script that dynamic it finds its way around a Menu, figures out how to play every game, and then take a screenshot in it's brightest moment
This actually has me convinced that: yes, there are people taking screenshots all the time :-)
It wouldn't happen automatically, bigger websites also wouldn't publish a flash game straight away when a user uploads it, it get moderated first by some employee. And whilst he's at it, he takes a small screenshot.
You might find a desktop programming language solution for it, there you might be able to set a 10s delay time before taking a screenshot of some sort. But PHP is quite impossible as I see it.
Hope it helps!
B
#5
Posted 25 December 2008 - 06:05 AM
But:
1. there's a PHP script that has such a long execution time to wait until Mario jumps over a turtle
I thought that there must be some way... may be I was wrong.
For example I'll show you a command line that ffmpeg offers(for flv ofcourse :/ ):
ffmpeg -i "<file path>" -f image2 -s Width[x]Height -ss 00:00:50 -vframes 1 -an "image path.jpg"So here I can take image from my file and skip the first 50 seconds.
May be this is the moment when mario jumps on the turtle
May be this is the truth.This actually has me convinced that: yes, there are people taking screenshots all the time :-)
It wouldn't happen automatically, bigger websites also wouldn't publish a flash game straight away when a user uploads it, it get moderated first by some employee. And whilst he's at it, he takes a small screenshot.
All right then, skip my jokes and have a nice day.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users