Create an account


Creating previews of flash files

#1
Hey,
has anyone here an idea how to create preview images of .swf files?
Maybe even automated on the server?
Thanks Smile
There is a theory wich states that if ever anyone discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.
Reply

#2
(28-06-2011, 09:40)eins Wrote: Hey,
has anyone here an idea how to create preview images of .swf files?
Maybe even automated on the server?
Thanks Smile

One possibility is to load the .swf with an Loader into another .swf, gotoAndStop to the frame you want to capture and then get the BitmapData of the Loader. Send it to a .php-script and save it to a picture.

This could help you: http://www.onegiantmedia.com/image---as3...hard-drive

if you have questions follow me on twitter so i get your questions in time Wink http://www.twitter.com/daZwiafl
Reply

#3
https://github.com/AdamN/python-webkit2png/

Possibly need to run with --feature=plugins --wait=(some number)
And flash plugin must be installed, of course.

It captures from web pages, not flash directly, so there should be webserver or static pages with only flash movie in left top corner to be easily cropped.

Easily automateable on server. Works under Linux, Windows and Mac OS. May require xvfb X server, but maybe it is optional.
Reply

#4
Okay, both options look interesting, but i dont have flash or python installed at the moment.
Also i dont think i know anything about AS, so the first thing would be pretty complicated for me... unless someone makes that .swf for me Smile
There is a theory wich states that if ever anyone discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.
Reply

#5
I have an app called Soufflé on Mac OS X which can create those screenshots for use in Finder (including quick look).

But I do not know weather it is possible to use parts of this on a server as well...
Reply

#6
Okay, i found Swftools, and it has a programm called Swfrender ( http://wiki.swftools.org/index.php/Swfrender ), that does exactly that.
Installed it and wrote a script that makes automated previews. tested with the loops 0-40.
Takes about 0.3s per preview image. The result isnt really good, but its useable.
http://raz.z0r.de/swftest.php (method 1, their "legacy" mode, gives better results in my opinion)

Soneone on Facebook also told me that 'gnash' has the option to give an png output, but i couldnt find any info on google. Still have to look into that Smile
There is a theory wich states that if ever anyone discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.
Reply

#7
Sometimes it captured the loading screen of the loop.
Isn't there an option to take the 2nd second of the loop or sth. like that?

The one on the right side are sometimes better but sometimes they cut off the background
Reply

#8
Nope, Swfrender does not have such an option.
As far as i know its actually only intended to create pictures of .swf's created with the Swftools pack, thats why there are so many errors Smile
There is a theory wich states that if ever anyone discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.
Reply

#9
hi...

i've did a bit of experimenting...
my script won't be much faster then swftools... but i've managed to capture a given frame of all the AS3-loops... but i'm suffering with the older ones.

i'll do some further testing and will host the app sometime tomorrow.
link following....

maybe it's usefull for u
Reply

#10
(28-06-2011, 17:54)eins Wrote: Soneone on Facebook also told me that 'gnash' has the option to give an png output, but i couldnt find any info on google. Still have to look into that Smile

Gnash can do that:
Code:
gnash --screenshot 1 --screenshot-file myscreenshot.png myflashanim.swf
This will save the frame 1 of myflashanime.swf into myscreenshot.png.
[/code]


Attached Files
.txt   gnash_manual.txt (Size: 4,27 KB / Downloads: 2)
Reply




Forum software by © MyBB Theme © iAndrew 2016