ccapture.js
ccapture.js copied to clipboard
png sequence frame mismatch
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?
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.
I think toBlob is async and returning blobs of PNGs out of order.
