Get the latest tech news

We increased our video rendering speeds by 70x using the WebCodecs API


An Open Source Toolkit to build video apps with Motion Canvas

To export a video to mp4, we loop through all yield statements in your generator function, draw the corresponding frame to an HTML Canvas and then pass it to an encoder. During rendering, Motion Canvas loads videos as HTMLVideoElements, sets the.currentTime attribute to the required time and waits for the browser to seek to the correct position. Using the new decoder, we already achieved 10x speedups - additionally, our project structure became a lot simpler, as we were able to remove the "hacky" websocket connection and move more work to the browser.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of 70x

70x

Photo of WebCodecs API

WebCodecs API