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
make.





On 3/5/07, Jon Molesa <[EMAIL PROTECTED]> wrote:

* Seth Markowitz <[EMAIL PROTECTED]> wrote:

> what is the "wip" documentation? -- sure.. you can use the example in
the
> doc.

wip=work in progress

> You're absolutely right.  The real question here is what is a good
formula
> for converting milliseconds to frames.  Right now I'm doing this in my
perl
> 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
[EMAIL PROTECTED]
http://www.consoltec.net

_______________________________________________
swfmill mailing list
swfmill@osflash.org
http://osflash.org/mailman/listinfo/swfmill_osflash.org

_______________________________________________
swfmill mailing list
swfmill@osflash.org
http://osflash.org/mailman/listinfo/swfmill_osflash.org

Reply via email to