Skip to content

Video

A film plays in the browser, and the same story renders to an MP4 with recit render. Both paths read the same blocks, timing and themes, so a paused frame in the page is the frame of the video. video.recit.dev leads here.

TerminalBash
npx recit render story.md --aspect 9:16 --output out/
AspectSizeUse
16:91920 × 1080talks, pages, product videos
1:11080 × 1080feeds
9:161080 × 1920stories and shorts
4:51080 × 1350portrait posts

--preset renders the film once per output preset of a social network, at its ratio, into <story>.<preset>.mp4: instagram-story and tiktok (9:16), instagram-post (4:5), square and linkedin-post (1:1). Every MP4 is listed in the exports.json beside it with its size, its ratio and its preset, next to its captions.

TerminalBash
npx recit render story.md --preset instagram-story,instagram-post,square --output out/

--aspect takes several ratios too: --aspect 9:16,1:1,4:5 renders one MP4 per ratio, <story>.9x16.mp4, <story>.1x1.mp4 and <story>.4x5.mp4, each in exports.json with its captions.

On a social feed, a video starts muted. --burn-captions draws the voiceover of each scene into the frames, in the style of the player's captions, at 48 px on a 1080 px-wide film. With --preset, the captions sit above the band the network's interface covers. The .vtt and the transcript are still written beside the MP4.

TerminalBash
npx recit render story.md --preset instagram-story --burn-captions

--poster writes <story>.poster.png beside each MP4 for the cover of a reel or a player's thumbnail, picking the middle of the first scene by default (or <scene|time> when given). --still <scene|time> writes only that frame as a PNG, by scene id or by time in seconds, without rendering the MP4 or needing ffmpeg. Every PNG is listed in exports.json next to it, with role: "poster" on the cover.

TerminalBash
npx recit render story.md --preset instagram-story --poster npx recit render story.md --still 2.5

@recit/motion-render draws the film in Chromium through Playwright and assembles the MP4 with the ffmpeg of the system. It is an optional dependency, loaded on demand: playing a film in a page never needs it.

Several languages

In a project with i18n.locales in recit.config, each language of a film has its own file: film.md for the default language and film.fr.md beside it. --locale fr renders that language into film.fr.mp4, and --all-locales renders every language found in order, writing film.mp4 and film.fr.mp4 with their captions. Each output is listed in exports.json with its locale tag so downstream tools can pick the right video and subtitles.

TerminalBash
# film.md ("Lorem ipsum") and film.fr.md ("Dolor sit amet") npx recit render film.md --all-locales --output out/

Charts and maps in a film

A scene that holds a ::chart or a ::map (with the data: of the front matter, as in a report) shows its first heading above the figure and leaves out other paragraphs, with a warning. A ::chart{type=bar} with a single series of 1 to 12 non-negative bars becomes an animated bars block whose bars rise in order (highlight= marks one bar in the accent color when it names a label), and a ::chart{type=line} with a single series of 2 to 60 points without gaps becomes a line block whose curve traces from left to right.

MarkdownMarkdown
--- id=visits ## Lorem visits ::chart{data=lorem type=bar x=month y=visits unit="%" highlight="Mar"}

Any other chart (several series, missing values, more points, another chart type) and a ::map without type=map stay a still picture of the figure, entering with a fade (or rising from the bottom for multi-series bars). The same goes for a card of a web story rendered with recit render. The figure is drawn in Chromium with the colors of the theme, then written into the SVG of the film.

A scene type=map with a ::map{…} is an animated map shot instead: its camera and shapes are computed from the directive, without an atlas, and drawn at the film's own frame (16:9, 9:16, 1:1 or 4:5).

Downloads

The MP4 files of the gallery are rendered in CI and attached to the site build when they exist.

No MP4 is attached to this build: videos are rendered in CI, never by the site build. Render one locally with recit render.

Read how to render, the options and the voice-over in the motion documentation.