ccapture.js icon indicating copy to clipboard operation
ccapture.js copied to clipboard

png sequence frame mismatch

Open benjyu opened this issue 7 years ago • 2 comments

it is not a big problem, but sometimes the png sequence has certain frames jumped head and it results in several jumps in the video rendered from the sequence. I could manually adjust the sequence, but is there any problem with the program that might have led to this behavior?

benjyu avatar Dec 02 '17 01:12 benjyu

I had the same issue, with some frames ahead of time and others behind. What solved the issue for me is adjusting my implementation to what it says in the documentation:

The only requirement is that you step your values per frame according to ellapsed time. In other words, don't increment your variables with a fixed value each frame, but use an ellapsed time delta to adjust those increments. CCapture.js works by hooking the common methods for obtaining that ellapsed time: Date.now(), setTimeout, requestAnimationFrame, etc. and making them behave like a constant time step is happening, fixed by the specified framerate.

etherlind avatar Nov 29 '18 11:11 etherlind

I think toBlob is async and returning blobs of PNGs out of order. Screen Shot 2019-05-16 at 9 24 45 PM

chrisgervang avatar May 17 '19 04:05 chrisgervang