Exporting video

Turn the scene into a video file. Your browser can encode it, the companion’s ffmpeg can, or your own Manim can draw it: pick the one that fits what you have.

The dialog

Choose Export ▸ Video…. The same entry is in the list that opens from the arrow of the Export… button, next to the menus. Exporting says what each export is for.

The Export video dialog with the Browser encoder chosen; Companion · ffmpeg and Render with Manim are greyed out, each with the reason. Below are the format, size, frame rate and range fields, the summary of the file and the Export button.
The dialog with no companion running: Browser is the encoder that works, and the other two say why they do not.
  1. Encoder: what makes the video (next section). One that is not available stays on the list, greyed out, with the reason.
  2. Format: the file type. The list depends on the encoder.
  3. Size: the project’s own size, a preset or a size of your own.
  4. Frame rate: the project’s, a preset or your own.
  5. Range: the whole scene, or a stretch of it.
  6. Export starts it.

Under the fields, one line says what you will get — for example 672 frames · 11.2 s · 1920 × 1080 at 60 fps. The file is named after the project and lasts exactly its frames divided by its frame rate, to the frame.

Three ways to make the video

The encoder decides who draws and encodes the frames. Each one changes the fields under it; the sections that follow show them one by one.

BrowserCompanion · ffmpegRender with Manim
What draws the pictureThe editor, as in the PreviewThe editor, as in the PreviewManim, from the exported Python
What you needA browser that can encode video (Chrome and Edge can)The companion running, and ffmpeg on its machineThe companion started with --allow-manim-render, and a ManimCE or ManimGL it can reach
FormatsMP4 (H.264 or AV1), WebM (VP9)MP4 (H.264), WebM (VP9), MOV (ProRes), GIFMP4
RangeWhole scene or customWhole scene or customWhole scene
SoundYesYes, except in a GIFYes

Start with Browser: it needs nothing. Choose Companion · ffmpeg for a cleaner H.264 file, for ProRes or for a GIF. Choose Render with Manim when the video must be Manim’s own picture, for example to put it next to scenes you wrote by hand.

In the browser

The browser encodes the frames itself, with WebCodecs, and nothing else has to run. The frames are drawn by the same renderer as the Preview, so the video matches what you see. A scene with a camera is filmed through it, as the camera view shows it.

With the companion’s ffmpeg

The editor draws the same frames and sends them to the companion, a small program on your machine, whose ffmpeg encodes them. It adds formats the browser does not have.

The top of the Export video dialog with Companion · ffmpeg chosen: its format is MP4 · H.264 and its quality is Medium. Under the quality a line reads: Up to 4 GiB per video: the companion’s limit.
With a companion that has ffmpeg: the encoder (1), its format (2), its quality (3) and how large a video this companion writes (4).
FormatWhat it is for
MP4 · H.264The usual file for the web and for sharing. ffmpeg encodes it with x264.
WebM · VP9An open format for the web.
MOV · ProRes 422 HQA large, high-quality file to edit in a video editor.
GIFA looping picture without sound. At most 50 frames a second and 1920 pixels on a side. A long or large GIF can run over the companion’s limit: it then refuses the job, and the dialog shows why.

Quality — Low (small file), Medium or High (large file) — sets how much the encoder keeps. MOV and GIF have no such choice.

Under the quality the dialog says how large a video this companion writes: Up to 4 GiB per video: the companion’s limit. Start it with --max-video-gib to give it another. A video that passes the limit is never saved cut short: the export fails and says so, and nothing is written. The companion also stops an export when its disk is nearly full. How large a video can be has both limits and how to change them.

Two things must be in place: the companion running, and ffmpeg on its machine. When either is missing the option says which. The page about the companion shows how to start it and how to check that ffmpeg is found.

Rendered by Manim

The editor exports the Python scene (the same one as Export ▸ Python) and the companion has your own Manim render it: the video is Manim’s, frame for frame.

The top of the Export video dialog with Render with Manim chosen: a Manim field with ManimCE selected, and the range fixed to the whole scene.
Render with Manim (1): the library to use (2) and a range that is always the whole scene (3).

The video ends with the last animation. Sound that goes on after it is cut there, and the dialog says by how much.

Size, frame rate and range

The lower part of the Export video dialog with a custom size of 1000 by 1000, a custom frame rate of 30 and a custom range from 2.5 to 7.5 seconds, with the warning about the picture's shape and the summary line.
Everything custom. The warning (1) is about the shape of the picture; the summary (2) says what the file will be.

The frame of the scene is always 8 units tall. A picture of another shape than the project’s shows more or less space at the sides than the Preview does, and the dialog warns you.

Sound in the video

A project with sound clips gets an option at the top of the dialog, Include audio · volume curves and track mute. It is on by default. The sound is the same mix as Export ▸ Audio… (Audio): the volume lines and the track mutes are applied.

The top of the Export video dialog of a project with sound: the Include audio option, the format, a warning that the sound of this MP4 will be Opus, and under it a button that reads Use Companion · ffmpeg for AAC (MP4 · H.264).
The option (1); in Chrome on Linux, the warning that comes with an MP4 (2); and, with a companion running, the button that goes to its ffmpeg (3).

The companion needs to be version 1.5 or newer, with an ffmpeg that has the encoder, to add sound; the dialog says what is missing.

The file, and stopping

The lower part of the Export video dialog after a small export, with a custom size of 320 by 180, a frame rate of 10 and a range from 0 to 1.5 seconds: the estimate of the size, the summary line, a line that says that the file was saved, with its name and size, and a Download again button.
After the small export of the Try it, through a browser that downloads: the estimate made before it (1), and the line that names the file and its size (2), with Download again under it.

The file is named after the project: The square of a sum.mp4. In Chrome and Edge a window asks where to save it before the export starts, and the dialog ends by saying Written to The square of a sum.mp4 and its size. Elsewhere the browser downloads the file when it is done, and the dialog says Saved and offers Download again.

While it runs, the dialog shows what it is doing — Encoding, Sending frames, Mixing audio — and a progress bar with the frame it has reached. Cancel export stops it and throws the partial file away. Close says Cancel and close while it runs. When the button says Saving…, the file is being closed: that cannot be cancelled, and closing the dialog only hides it.

What the dialog tells you

MessageWhat it means
Waiting for a formula to render (name)…A formula on the timeline is still being drawn. Export stays off until it is done, so that no old picture is filmed.
name does not render with its current LaTeX: the video draws its last good render.Browser and ffmpeg use the last picture that worked. Render with Manim cannot: fix the formula in the Creator.
name is empty and will be missing from the video.A formula with no content has nothing to film.
The companion is not running. Start it: …The two companion encoders need it. The line gives the command (Starting it).
Rendering with Manim is off. Restart the companion with --allow-manim-render…Render with Manim is off until the companion is started with that option.
ffmpeg is not installed on the companion’s machine (or not on PATH).Install ffmpeg where the companion runs. The health command tells how.
Up to 4 GiB per video: the companion’s limit. Start it with --max-video-gib to give it another.How large a video Companion · ffmpeg may write. The number is the one of the companion that is running.
This companion is older than 1.7: a video over 4 GiB may come back cut short, with no warning. Update companion/mfe_companion.py.An older companion did not check the size of what it wrote. Use the mfe_companion.py of this version.
The video is larger than 4 GiB, the most this companion writes for one video, so it was stopped…The export failed at the companion’s limit, and nothing was saved. Export a shorter range, a smaller size or a lower quality, or restart the companion with a higher limit (How large a video can be).
The disk of the companion’s temporary folder (…) is nearly full: less than 1 GiB is free there, so the job was stopped…The companion keeps 1 GiB of that disk free. Free some room in the folder the message names, or start the companion with TMPDIR naming a folder on a larger disk.