Jump to content
Search Community

Drawing video thumbnails onto a bitmap

Nellisoft test
Moderator Tag

Recommended Posts

Before I get to my question, let me just say that all the greensock stuff is fantastic, and it really makes working in Flash a lot more enjoyable! Thank you for being awesome.

 

Alright, now to the issue at hand:

I'm using a series of VideoLoaders to grab stuff for a gallery, drawing each video onto a bitmap to use with PaperVision3D.

That all works fine, except that I want the video thumbnails to be from a few seconds into each one (instead of at frame 0, which is black on almost all of them).

 

//generate thumbnails
//vidArray contains five VideoLoaders
for (var i:int = 0; i < 5; i++) {
vidArray[i].gotoVideoTime(20, false, true);    <--
}
v1bit.draw(vidArray[0].content);
v2bit.draw(vidArray[1].content);
v3bit.draw(vidArray[2].content);
v4bit.draw(vidArray[3].content);
v5bit.draw(vidArray[4].content);
for (var i:int = 0; i < 5; i++) {
vidArray[i].gotoVideoTime(0, false, true);
}

Using the above, it only draws the first frame; the line with the arrow doesn't seem to be doing anything.

All of the videos are completely loaded by this point, and all have keyframes every 2 seconds.

Link to comment
Share on other sites

Flash can be a little funky when it comes to rendering NetStreams - I believe it needs 1 frame to render the new position. In other words, VideoLoader is properly telling the NetStream to skip to a particular point, but the Flash Player still displays the old video frame until the next ENTER_FRAME (well, actually the RENDER) event fires.

Link to comment
Share on other sites

  • 2 weeks later...

Nellisoft, did you get this to work? I tried something similar, but was getting inconsistent results (my timer was firing 2-2.5s after load complete). Sometimes I was getting the expected frame, and others just a black frame...

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...