Dev log
DevLog #03: How to Convert HTML, Canvas, and Three.js Animations to 60 FPS MP4 Video in the Browser (Who We Compete With and Why We Win)
Technical chronicle of how we built a deterministic offline player and renderer using WebCodecs and mp4-muxer. We compare our architecture against Remotion, Puppeteer, and OBS, and explain why client-side rendering beats server farms.
By Engineering Team ยท WebGPU Architecture & Offline Render
- devlog
- canvas
- webcodecs
- mp4-muxer
- threejs
- gsap
- remotion
- video engineering
- motion graphics
With the boom of AI models like Claude 3.5 Sonnet, ChatGPT, and Gemini, millions of creators and developers are generating HTML code, GSAP animations, Canvas 2D particle systems, and Three.js 3D scenes with a single prompt. However, there was a major bottleneck: **How do you convert that HTML code into a crisp 60 FPS MP4 video to drop into Premiere, DaVinci, or TikTok without installing developer tools?**
Today we launched the Canvas & HTML to MP4 Player, a 100% free tool that lets you preview any animation with a multi-track studio timeline and export it to MP4 directly inside the browser. In this DevLog, we break down our technical architecture, who we compete with, and why our client-side solution is technically superior.
Want to test the Canvas & HTML Player now?
Paste your HTML code, control every frame with the timeline, and export 60 FPS MP4 with zero watermarks or signup.
The Competitive Landscape: Who do we compete with and what are their limits?
Before building this solution, we analyzed the 4 existing market alternatives for converting code animations into video:
Pillar 1: Deterministic Rendering with window.seekTo(t)
The fatal flaw of live screen recording is that rendering speed depends on CPU load. If the browser hiccups for 50ms, the recorded video stutters visibly.
To solve this, we established a deterministic contract based on window.seekTo(timeInSeconds). The engine takes absolute control of time: freezes the canvas, steps animation to the exact microsecond, waits 2 animation frames (requestAnimationFrame), and pulls the frame from GPU memory before moving to the next.
for (let frameIndex = 0; frameIndex < totalFrames; frameIndex++) {
const timeSec = frameIndex / fps;
const timestampMicros = Math.round(timeSec * 1_000_000);
// 1. Freeze and position animation to exact time
if (typeof iframeWin.seekTo === 'function') {
iframeWin.seekTo(timeSec);
}
// 2. Wait for canvas buffer refresh
await waitFrames(2);
// 3. Capture frame directly from GPU with VideoFrame
const frame = new VideoFrame(canvas, { timestamp: timestampMicros });
videoEncoder.encode(frame, { keyFrame: frameIndex % 60 === 0 });
frame.close();
}Pillar 2: WebCodecs + MP4-Muxer (Native H.264 without Server FFmpeg)
Historically, multiplexing an MP4 file with H.264 required sending gigabytes of images to a server with FFmpeg or downloading 30 MB WebAssembly binaries that overheated laptops.
Our architecture leverages native **WebCodecs API (VideoEncoder)** with the avc1.4d002a profile (H.264 Main Profile 4.2). The encoded packets are passed directly into an in-memory ISO BMFF muxer (mp4-muxer), generating a standard .mp4 file ready for Premiere, DaVinci Resolve, or CapCut in seconds.
Conclusion: The Browser is the New Video Workstation
We proved that you do not need expensive cloud rendering clusters or complex dev environments to render code animations at studio quality. Modern browser hardware acceleration with WebGPU and WebCodecs gives creators instantaneous, free, and private creative tools.
Start creating and exporting your animations today
100% free, no watermarks, with full hardware acceleration.
Try the editor as it stands today
Everything you read in the dev log already runs in the public beta.