Under 2 Minutes: Our Optimized Render Pipeline | RemotionAI Blog

· 6 min read · Engineering

How we built a fast, reliable video rendering pipeline with content-hash bundle caching and single-render concurrency.

RemotionAI renders most videos in under 2 minutes through content-hash bundle caching, single-render concurrency control, and preflight validation — down from the original 8–12 minutes. The optimized pipeline powers all video generation modes including Remotion Claude and Prompt to Video.

The bottleneck: bundling

Remotion works by bundling a React application, then using a headless browser to render each frame. The bundling step was our biggest time sink. Every render triggered a full Webpack build of the Remotion project, even if nothing in the source code had changed.

Content-hash bundle caching

Our solution was content-hash bundle caching. Instead of bundling from scratch every time, we hash the source files and check if we've already built that exact bundle. If the hash matches, we skip the build entirely and use the cached bundle.

For typical usage patterns — where a user generates a video, previews it, maybe refines it once or twice — this eliminates 60–70% of our bundling time.

Single-render concurrency

Each worker processes one render at a time, which prevents resource contention and keeps individual render times predictable. This was a deliberate tradeoff — single-render means your video takes the same amount of time whether there are 0 or 50 other renders queued (assuming available workers).

Preflight validation

We added a preflight validation step that checks the composition before rendering starts, catching missing asset URLs, invalid animation parameters, scene plan inconsistencies, and timing conflicts upfront.