What is the fastest way to create 1 second video from image array:
var frames = []
function capture(time) {
canvas.getContext('2d').drawImage(player, 0, 0, 640, 480);
preview.getContext('2d').drawImage(canvas, 0, 0, 640, 480);
var imgString = canvas.toDataURL('image/webp', 1);
frames.push(imgString);
requestAnimationFrame(capture)
}
requestAnimationFrame(capture)
Code above continuously "captures" an image from a live stream player
.
What would be the fastest way continuously create video chunks for this continuous image capture?