Jump to content
Search Community

VideoLoader misses frames right after skipping

bokan test
Moderator Tag

Recommended Posts

I'm creating a video player with a smooth fine scrub function (frame by frame). I do that by loading video in background, caching each frame in an array of bitmapData. I cache only 2 sec before and after current position (125Mb of bmp).

 

The system requires lot of skipping. I took care of skipping only to keyframes, (the first frames of GOP). I skip only to the time of metadata seekpoints. Each jumps behave the same : it correctly display the keyframe them misses 5 to 6 frames then display the remaining frames normally.

 

I first thought that the _ns.time property was not accurate so I embeded the frame number in a binary barcode into the frame. So I can accurately get frame number. like here http://nikohelle.net/2011/11/25/as3-perfect-video-sync-with-embedded-frame-numbers/

 

Any Idea on how to get keyframe+1 image just after a jump ?

 

 

 

Link to comment
Share on other sites

I'm not really sure, but I don't think this is related to VideoLoader specifically - it may just have to do with all the overhead related to buffering the video and the bitmap generation you're doing. So, for example, maybe it skips correctly but then the CPU is hogged for a while and by the time it can breathe again it says "oh, I'm supposed to be on the 6th frame now...let me go there..." Have you tried reducing everything down the most basic, streamlined, non-intensive version to see if you still have the skips? There's a chance that it has to do with your video encoding as well. 

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