[swfmill] newbie: creating animation from a series of jpg files various timings
seth.markowitz at gmail.com
Mon Mar 5 13:32:15 EST 2007
Jon.. I think i'm making this too complicated. The way the capture program
works is that you can set a capture rate in FPS. So I capture the jpg files
around 10 "grabs" per second. The logic behind the capture, however,
discards duplicate images. So if the VGA output hasn't changed for 60
seconds, there is only 1 jpg file. But if there is a lot going on, say the
VGA is capturing mouse movents/video then there are a bunch of jpg files
being created. The XML document records in milleseconds when each jpg is
captured. My goal is to create some kind of "movie" (swf, flv, wmv, avi)
format to ease the pain of having to swap in and out a 1000 jpg files.
Essentially you are right, I am NOT capturing 1000 jpg in one second, in a
rare case it could get as frequent as 25 "grabs" per second, basically I
have control of the "grab rate".
So the easiest case would be 10fps. If the frame "grab rate" is around
10fps I should have 10 jpg images. Then I would need to look at the time
stamps on those images and figure out what frame they belong in. Simply, a
time stamp of 5000ms, would mean the image goes into frame #5. What about a
timestamp of 6637ms ? My current logic would put the image into frame 7.
So you can start to see where the precision starts to break down.
Typically, the jpg images are spaced far enough apart so you won't really
see two images where the timestamps are causing a problem, like file1.jpg is
at 5600ms and file2.jpg is at 5700ms.. although that's a good point you
On 3/5/07, Jon Molesa <rjmolesa at consoltec.net> wrote:
> * Seth Markowitz <seth.markowitz at gmail.com> wrote:
> > what is the "wip" documentation? -- sure.. you can use the example in
> > doc.
> wip=work in progress
> > You're absolutely right. The real question here is what is a good
> > for converting milliseconds to frames. Right now I'm doing this in my
> > script:
> > $fps = 15;
> > $frameNum = int($millisecondTimeStamp/1000 * $fps);
> IMHO that would only give you which "block" of frames the jpg should be
> inserted into. Suppose you use a 12fps, then there are potentially 84
> jpgs from a 1000ms capture rate that could "fit" into each frame.
> If you capture program did(i believe that is doesn't) capture a frame
> each ms then after 1 second = 1000 jpgs = 12 frames. But your capture
> programs capture an image randomly. Now to get down to the simple we'll
> just look at one frame or 1/12th of a second, or ~84ms. The way I see
> it is that your challenge is to figure out which frame/fraction of
> second/or 84th ms your picture "fits" into. There should be someway to
> dispose of an image if two occur within the same frame. How to handle
> the missing frame though I'm not so sure.
> Jon Molesa
> rjmolesa at consoltec.net
> swfmill mailing list
> swfmill at osflash.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swfmill