<br><br><br><div><span class="gmail_quote">On 3/5/07, <b class="gmail_sendername">Jon Molesa</b> <<a href="mailto:rjmolesa@consoltec.net">rjmolesa@consoltec.net</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Nice solution to a problem. Mind if I include this in the wip<br>documentation as an example?</blockquote><div><br><br>what is the "wip" documentation? -- sure.. you can use the example in the doc.<br> </div><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">In either case, your issue isn't so much with swfmill as it is a<br>mathematical conversion from ms to fps. Is that a correct assessment?
</blockquote><div><br><br>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:<br><br>$fps = 15;<br>$frameNum = int($millisecondTimeStamp/1000 * $fps);
<br><br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">My first thought is to decide on a fps rate that you'd like to have.<br>
Then there _could_ be total of 1000 fps with the framegrabber. A fps of<br>12 fps is a good speed for the human eye I believe?? Double check on that.<br>You'd have to figure out which block the captured frame fell into and place it
<br>in that frame. On a 12 second frame rate, 1 frame would contain<br>83.33ms. So you'd just have to figure out what which block the captured<br>frame fell into. swfmill frame second1-frame1~=84ms, second1-frame2~=168ms... and so on.
<br>It's too early to come up with a formula, but maybe later, or maybe<br>someone else can develop that. Anyway, I hope it helps and is close to<br>correct. But that's the way I see it.<br><br>* Seth Markowitz <
<a href="mailto:seth.markowitz@gmail.com">seth.markowitz@gmail.com</a>> wrote:<br><br>> Hi,<br>><br>> I'm a newbie to swfmill, but I did get it working for my purposes... I'm<br>> just trying to figure out how to make it more efficient. Here is my
<br>> situation:<br>><br>> Here's my inventory:<br>> 1. I have 1000 jpg images taken from a vga frame grabber - NOT in frames per<br>> second... the timing is variable. For example, file1.jpg was grabbed at
<br>> 30ms, file2.jpg was grabbed at 400ms, file3.jpg at 410ms, an so on. The time<br>> starts from Time == 0ms when the frame grabber was turned on.<br>><br>> 2. I have an XML file called capture.xml that contains the timestamp in
<br>> milliseconds for when each jpg was captured:<br>><br>> <Capture><br>> <FileName>Slide_0020.jpg</FileName><br>> <SlideNumber>20</SlideNumber><br>> <CaptureTime>64174</CaptureTime>
<br>> </Capture><br>> <Capture><br>> <FileName>Slide_0021.jpg</FileName><br>> <SlideNumber>21</SlideNumber><br>> <CaptureTime>64869</CaptureTime>
<br>> </Capture><br>><br>> So....<br>> By putting all the jpg files together into a SWF via swfmill, I should have<br>> a fairly descent "flipbook" type animation. I've created a perl script to
<br>> parse the capture.xml file and creates a swfml file that looks like this:<br>><br>> <?xml version="1.0" encoding="iso-8859-1" ?><br>> <movie width="640" height="480" framerate="15">
<br>> <background color="#ffffff"/><br>> <frame><br>> <!-- frame:0 ptime:54 --><br>> <library><br>> <clip id="image1" import="Slide_0001_Full_resize.jpg" />
<br>> </library><br>> <place id="image1" name="myImage1" x="0" y="0" depth="1" /><br>> </frame><br>> <frame/><frame/><frame/><frame/><frame/><frame/><frame>
<br>> <!-- frame:6 ptime:408 --><br>> <library><br>> <clip id="image2" import="Slide_0002_Full_resize.jpg" /><br>> </library><br>> <place id="image2" name="myImage2" x="0" y="0" depth="2" />
<br>> </frame><br>> <frame/><frame/><frame/><frame/><frame/><frame><br>> <!-- frame:11 ptime:752 --><br>> <library><br>> <clip id="image3" import="Slide_0003_Full_resize.jpg" />
<br>> </library><br>> <place id="image3" name="myImage3" x="0" y="0" depth="3" /><br>> </frame><br>><br>> .....<br>><br>> Right now this is klunky because I'm trying to convert the millisecond
<br>> timestamp into frames per second. For example, if I want to run this<br>> animation at 10fps, I know that the jpg captured at 100ms will appear in<br>> frame 1 and so on (is that right??). So what happens in between each
<br>> frame... if file1.jpg is captures at 10seconds before file2.jpg, I just<br>> stick (10x10) 100 <frame /> tags as filler in between the two images. There<br>> must be a better way than this. Also, since I'm converting from
<br>> milliseconds to frames per second... I think I'm losing a lot of precision.<br>><br>> How could I create this "flipbook" effect, given the inventory above using<br>> swfmill simple?<br>>
<br>> I think this is a pretty interesting problem and I really wanted to thank<br>> the creators of swfmill... it's a great solution to this type of thing. I<br>> was orginally trying to create an AVI file from this series of jpg files,
<br>> but it got way too complicated for me.<br>><br>> Looking forward to some suggestions!!<br>><br>> Seth<br><br>> _______________________________________________<br>> swfmill mailing list<br>> <a href="mailto:swfmill@osflash.org">
swfmill@osflash.org</a><br>> <a href="http://osflash.org/mailman/listinfo/swfmill_osflash.org">http://osflash.org/mailman/listinfo/swfmill_osflash.org</a><br><br><br>--<br>Jon Molesa<br><a href="mailto:rjmolesa@consoltec.net">
rjmolesa@consoltec.net</a><br><br>_______________________________________________<br>swfmill mailing list<br><a href="mailto:swfmill@osflash.org">swfmill@osflash.org</a><br><a href="http://osflash.org/mailman/listinfo/swfmill_osflash.org">
http://osflash.org/mailman/listinfo/swfmill_osflash.org</a><br></blockquote></div><br>