thenickdude / webm-writer-js

JavaScript-based WebM video encoder for Google Chrome
272 stars 43 forks source link

Export with quality of 1 fails #12

Closed MAKIO135 closed 4 years ago

MAKIO135 commented 4 years ago

When setting quality to 1, WebMWriter fails to export video since there is no space after VP8 in the generated binary. https://github.com/thenickdude/webm-writer-js/blob/7945d3c6ce1b77ac50daabae50d39677d20daf32/src/WebMWriter.js#L77

Workaround is to set quality to 0.99 but just wanted to let you know, maybe just to constrain quality to 0.99.

Except for this, the library works just fine, I'm using it to export canvas loops (https://observablehq.com/@makio135/bnb) thanks a lot 🙏

thenickdude commented 4 years ago

Thanks for the bug report, I've now fixed it so that quality = 1.0 gets clamped down to 0.99999 automatically. (Quality 1.0 was generating VP8L lossless frames, which don't appear to be supported in WebM)