Motio guide
Motio makes videos with React. A video is a React component that draws one frame at a time: Motio tells it which frame to draw, takes a screenshot in a real headless Chrome, and encodes the screenshots with FFmpeg. Because each frame is a function of its number, any frame can be rendered alone, in any order, on any number of browser tabs, and always gives the same pixels.
This guide is for people starting with Motio. It assumes you know React and TypeScript, and nothing else about video.
- Getting started: create a project with
motio init, preview it, render it. - Project structure: what each file of a project does.
- Core concepts
- Frames and time:
useCurrentFrame(), frame rates, determinism. - Compositions: videos and stills, props and their schema, metadata computed from data.
- Sequences and series: placing things on the timeline, transitions between scenes.
- Animation:
interpolate(),spring(), easing, colours. - Media: images, animated images, video, audio, preloading for the Player.
- Fonts and text: local files, Google Fonts, backgrounds that follow lines of text.
- Readiness: making the render wait for data with
delayRender().
- Frames and time:
- Rendering from the CLI: videos, stills, image sequences, codecs.
- Rendering from Node: the same pipeline as a library, media functions, one browser for many renders.
- Configuration:
motio.config.ts,MOTIO_*variables and which value wins. - FFmpeg: which FFmpeg Motio uses, codecs and encoders, the pinned build to come.
- Testing renders in CI: determinism and flicker checks,
--json. - Coming from Remotion: running a Remotion project on Motio.
Every code sample in these pages is a file under examples/, type-checked with the rest of the repository by make check.