2026.11.04 · 5 min · animation · javascript · tooling · ai
A video is a web page you seek frame by frame.
Remotion and HyperFrames turn a web page into an MP4 without ever playing it: they pause every animation, seek to time = frame / fps, capture one still in headless Chrome and let FFmpeg encode the stills. That's why every frame has to be a pure function of time, and why setTimeout breaks renders. As of 2026.11.
Every video on my Instagram is a web page. Nobody screen-records it. Remotion renders it, and the way it does that explains most glitchy renders you'll ever debug: the renderer never plays your page. It pauses it, jumps to an exact time, takes one still, and moves on. HyperFrames works the same way. Coding agents write HTML, CSS and JS well, so this is how they make videos now too, and the same rule applies to their code as to yours.
Watch the 60-second version on Instagram.
Nothing plays
The common picture is "it plays the animation in a browser and records it". It doesn't. Nothing plays. Each frame is a frozen page seeked to an exact time, and frames may be rendered out of order or in parallel tabs.
HyperFrames' README puts it in one line: "The renderer seeks each frame in headless Chrome and encodes the result with FFmpeg, so the same input produces the same video." Three steps per frame:
- Pause. Every animation on the page is paused. GSAP timelines are "paused and seeked, never played". CSS and Web Animations API animations get the same treatment: the adapter reads
document.getAnimations(), callsanimation.pause(), then setsanimation.currentTimeto the composition time in milliseconds. The CSS fallback isanimation-play-state: pausedplus a negativeanimation-delay. - Seek. The time is
floor(frame) / fps. At 60 fps, frame 45 is 0.75 s and frame 120 is 2 s. "Real time is never consulted." - Snap. Headless Chrome (a browser with no window) captures that one state. On Linux HyperFrames uses Chrome's
HeadlessExperimental.beginFrame; on macOS and Windows, or when it finds rawrequestAnimationFrameloops, it falls back to screenshots.
Then FFmpeg encodes the stills into an MP4 and mixes in the audio.
The playhead in the figure jumps from tick to tick instead of sliding, because that is what the renderer does. The box in each still is at easeInOutCubic(t / 2 s), computed from the frame number alone.
Every frame is a pure function of time
If each frame is rendered on its own, possibly in another tab, then what's on screen at frame 45 can only depend on the number 45. That's the whole rule. HyperFrames lists what breaks it: Date.now(), requestAnimationFrame, system timers, unseeded Math.random(), and fetching data mid-render. Remotion's docs call CSS animations, transition, @keyframes and setTimeout "wrong" for the same reason: it "renders each frame independently", across several parallel tabs.
The gold points are a pure function of time and land on the curve at every frame. The outline points follow the wall clock, which the renderer never runs at real speed, so they lag, repeat and end short. Those outline positions are illustrative: the real ones depend on how fast each frame happened to render, which is exactly the problem.
// breaks: wall-clock driven
setInterval(() => box.style.left = x++ + 'px', 16);
// works: pure function of time (HyperFrames)
const tl = gsap.timeline({ paused: true });
tl.to('.box', { x: 600, duration: 2 });
window.__timelines.launch = tl;
// Remotion: const x = interpolate(useCurrentFrame(), [0, 120], [0, 600]);Read the frame, or seek the timeline
Both tools follow the same rule; they differ in who does the work.
| Remotion | HyperFrames | |
|---|---|---|
| How time reaches your code | You read it: useCurrentFrame() returns the current frame, and you compute that frame's values | It pauses and seeks the animations you already wrote: GSAP, CSS, WAAPI, Lottie |
| Its own summary | "A video is a function of images over time." | "The same input produces the same video." |
| FFmpeg | Bundled since v4, nothing to install | Install it yourself, plus Node.js 22+ |
| License | Free for up to three people | Apache 2.0 |
HyperFrames just shipped v0.9.0 (2026.11.02). It's mostly breaking changes to distributed rendering (Lambda and Cloud Run now on Plan v2 only), so it changes how you run renders at scale, not what a composition can do.
What still goes wrong
- Infinite animations and
finishedcallbacks. HyperFrames' adapter code calls out infinite iterations andanimation.finishedcallbacks that change the DOM; keep both out of a composition. - Assets still loading. A font or image that hasn't loaded yet gets captured as the loading state, which is one of the causes Remotion's flickering guide lists.
- "Works on my machine". Local renders differ slightly between font and Chrome versions. HyperFrames' Docker mode pins both.
On a client project I'd render in HyperFrames' Docker mode on CI, so a Chrome or font update on someone's laptop can't quietly change last week's video.
The short version
- HTML-to-video renderers don't record anything. They pause every animation, seek, and capture one still per frame.
- The time of a frame is
floor(frame) / fps; the wall clock is never consulted. - FFmpeg encodes the stills into an MP4 and mixes in the audio.
- So every frame must be a pure function of time: no
setTimeout,requestAnimationFrame,Date.now()or unseededMath.random(). - Remotion makes your code read the frame; HyperFrames seeks the GSAP, CSS and WAAPI animations you already wrote.
Sources: HyperFrames README · HyperFrames, Determinism · HyperFrames runtime adapters · HyperFrames css.ts · HyperFrames engine · Remotion, useCurrentFrame · Remotion, fundamentals · Remotion, CSS animations · Remotion, flickering · Remotion, FFmpeg · HyperFrames vs Remotion · HyperFrames v0.9.0