« Back to home
My name is Zeh Fernando, and this is my half-professional, half-personal website. I work as a frontend developer at Firstborn, in New York, and I usually write about programming.
Posted on 2/November/2012 at 10:52
Ludum Dare, the 48-hour game development compo, will take place in the week of December 14th-17th. The theme suggestion round has just opened; you can suggest one here.
I’ve pretty much come to the conclusion that there is no true way to get the true current frame of a video using any properties of the stream or metadata from the video. Whatever information you receive about the video you can never be sure that’s actually what pixels are being displayed. Even if you draw the video to a bitmap, you can never be sure what frame the video object is currently displaying when you copy the pixels. That is, the only way to know what frame is displayed is to actually look at that frame.
The only true thing you can trust about a displayed frame is the frame itself. Therefore, the solution I came up with is to embed the frame value into the video itself. This can be done as a small bar at the bottom of the video that is the binary value of the current frame displayed as a barcode. Then, every frame you capture the video frame, check the pixels of the barcode, and convert the binary value back to base-10 and voilà, you have the actual current frame.
wondering how i get my hands on the “expression’ that will embed code as video is exported out of after effects
Posted by tricia on 29/November/2012 at 1:39 · Reply
I don’t have that project anymore, so I don’t have the expression.
What I had was a bunch of squares (one square for each binary “digit”. The background was black, and the square was white. Then its opacity would be controlled by the expression, depending on the digit position. So the rightmost square would have an opacity of 1 if “current frame % 2 > 0″, and 0 otherwise. The second digit would have an opacity of 1 if “(current frame % 8) % 4 > 0″ (something like that). And so on and so forth. It was kinda hacky but worked well.
Frame number reading in Flash is still appallingly bad. I’ve created a bug/feature request on Adobe’s JIRA tracker a while ago but nothing came of it. If anything, we can be happy that it seems to be much better and precise in HTML5 (of all things). I did some small testing on Chrome a while ago and was very happy with the results!
Posted by Zeh on 29/November/2012 at 11:13 · Reply
I just downloaded your work from dafont.com while looking for a font whose license terms are agreeable with my entry in LD25!
I came to your website when I couldn’t find a license for this font. Could you tell me if I’m allowed to use this in my LD25 entry?
Posted by Don on 15/December/2012 at 2:28 · Reply
NO YOU ARE NOT! My LD shall be superior by disallowing people to use my fonts!
Just kidding. Sure you can use it. Maybe it’s not too obvious but that font has a free license.. you can use it as you please. I just “copied” the VGA font design anyway.
Good luck! Myself, I’m still thinking of ideas for LD 25…
Posted by Zeh on 15/December/2012 at 9:42 · Reply
Mail (will not be published) (required)