Motion Fundamentals

Programmatic video & video-as-code

Also searched as: programmatic video, video as code, generative video, Remotion React video, automated video

Canonical Definition

Programmatic video is video authored as software code — using React, TypeScript, and deterministic time functions — so each frame is produced by code and can be rendered at scale with dynamic data.

Target FPS

30fps or 60fps; rendered serverless on AWS Lambda or Cloudflare Workers

A traditional video file is a static, immutable artifact: changing one price or typo requires opening an editor, moving timeline layers, and re-exporting. Programmatic video turns video into a software template.

You pass a JSON payload (`{ username: 'Alex', metrics: [12, 45, 89] }`), and a cloud worker cluster renders 10,000 customized, 4K branded videos in minutes.

The Modern Video-as-Code Architecture

Leveraging React components, Tailwind, and WebGL for rendering

Because Remotion runs on React, developers can use standard web packages: Lucide icons, Three.js, Mathjs, Tailwind CSS, and D3.js. The web's entire visual ecosystem becomes video authoring tooling.

Catalog Implementation/Chart Story
componentdataInspect in catalog
822 lines of React

How this works: A programmatic chart composition generated dynamically from an input JSON data array.

  • Props-driven composition: change the props object to produce a new video
  • Headless CLI and Lambda serverless rendering
  • Exact typographical control with custom web fonts

Engineering Guidelines & Common Pitfalls

Best Practices (What to do)

  • Use seedable pseudo-random generators (e.g. `remotion`'s `random(seed)`) for particle noise.

Common Failure Modes (What to avoid)

  • Introducing non-deterministic randomness (`Math.random()`) without seeding: frame 10 will look different on worker A than worker B.
Generate with AI

Build programmatic video & video-as-code in Animatiq

Prompt our motion agent in natural language. Get back typed Remotion React code with custom easing curves, brand palettes, and frame-accurate timing.

Launch in composer

Related motion principles