spite / ccapture.js

A library to capture canvas-based animations at a fixed framerate
MIT License
3.6k stars 406 forks source link

Jank and generally poor quality of WebM Output. #94

Open datermine opened 5 years ago

datermine commented 5 years ago

I'm trying to record someone drawing on a canvas. To that end I've attempted to combine Fabric.js (http://fabricjs.com/) with CCapture.js.

I'm close to getting this right, but right now I have the following issues:

CodePen to demonstrate my issue: https://codepen.io/anon/pen/vbQraM?editors=1000

Also, see attached video file. hi.plus.squiggle.webm.zip

Any thoughts on what I might be doing wrong?

Thanks, George

PS. I was also looking at this: https://codepen.io/luckyboy07/pen/VXpyQw

datermine commented 5 years ago

To make understanding this easier to consume, here are two screenshots of the canvas vs. the WebM outoput.

canvas

vs.

webm
josedotjs commented 5 years ago

Hi, by default fabric js makes a transparent background, add the line canvas.setBackgroundColor('#fffff'); and the background is correctly rendered https://codepen.io/anon/pen/LvOQJz