Skip to content

Command line

The animation engine for agents: blazingly fast math and 3D videos with Manim's Python API, on a Rust GPU core.

A scene file is Manim CE code: import manimgx as m, a class deriving m.Scene, its construct. Work in a loop:

 manimgx check scene.py timeline, storyboard, layout problems manimgx still scene.py -t 1.5,end the frames at 1.5 s and at the end manimgx render scene.py the video (MP4), with the same report

Files are written beside the scene file; each command prints what it wrote.

Usage:

$ manimgx [OPTIONS] COMMAND [ARGS]...

Options:

  • --version: Show the version and exit.
  • --help: Show this message and exit.

Commands:

  • render: Render a scene to an MP4 video, with its...
  • still: Draw the frames on screen at given times,...
  • check: Check a scene: timeline, storyboard, layout.
  • preview: Preview a scene live: in a window, made...
  • present: Present a scene: its sections are the slides.

manimgx render

Render a scene to an MP4 video, with its sound.

Also writes a storyboard beside the video (the frame at each play's end, layout problems outlined and numbered) and lists those problems — see manimgx check — and, if the scene speaks or has subcaptions, its subtitles (.srt).

Usage:

$ manimgx render [OPTIONS] {FILE} [SCENE]

Arguments:

  • FILE: The scene file: a Python file defining manimgx scenes. [required]
  • SCENE: The scene (a class in the file); needed only if the file defines several.

Options:

  • -o, --output <path>: The video (.mp4). [default: .mp4 beside the file]
  • -r, --resolution WxH: Pixels, e.g. 1280x720. [default: the scene's config, 1920x1080 unless set]
  • --fps <int range>: Frames per second. [default: the scene's config, 60 unless set] [x>=1]
  • --preset <ultrafast|superfast|veryfast|faster|fast|medium|slow|slower|veryslow|placebo>: x264 encoding preset; faster presets render faster while making larger files. [default: ultrafast]
  • --crf <float range>: x264 CRF (0 to 51); lower is better. [default: 18.0; 0<=x<=51]
  • --help: Show this message and exit.

manimgx still

Draw the frames on screen at given times, on one sheet (PNG).

The frame at t seconds is the one on screen then (what a video player shows at t); end is the scene's last frame. Each is captioned #play t=… file:line: the play on screen and the line of code that played it. Six to a sheet (more go on <name>-2.png, …). Only the frames asked for are drawn, and the scene runs no further than the play showing the last.

Usage:

$ manimgx still [OPTIONS] {FILE} [SCENE]

Arguments:

  • FILE: The scene file: a Python file defining manimgx scenes. [required]
  • SCENE: The scene (a class in the file); needed only if the file defines several.

Options:

  • -t, --time TIME: Seconds from the start, or 'end'; several: repeat -t or separate with commas. [default: (end)]
  • -o, --output <path>: The sheet (.png). [default: .png beside the file]
  • --help: Show this message and exit.

manimgx check

Check a scene: timeline, storyboard, layout.

Runs the scene without video. Prints its timeline (each play: when, the line of code, what it played) and the layout problems a viewer would see when each play ends: anything the frame cuts off, texts that overlap, lines through or touching a text, fills over a text, text too small to read. Writes a storyboard: the frame at each play's end, problems outlined and numbered. Exits 1 if there are problems (notes, such as a graph leaving the frame, do not count).

Usage:

$ manimgx check [OPTIONS] {FILE} [SCENE]

Arguments:

  • FILE: The scene file: a Python file defining manimgx scenes. [required]
  • SCENE: The scene (a class in the file); needed only if the file defines several.

Options:

  • -s, --storyboard <path>: The storyboard (.png). [default: .storyboard.png beside the file]
  • --help: Show this message and exit.

manimgx preview

Preview a scene live: in a window, made again each time its code is saved.

The window plays the scene as it is made. Saving the file, or a module it imports from beside it, runs the scene again, and the window keeps its place; an error shows over the last good picture. A file of several scenes plays the one named, or its first; N and P go to the others. Keys: Space play/pause, ← → 5 s, , . a frame, Option (or Ctrl) with ← → a play, ? all of them. Closing the window, or Ctrl+C, stops.

Usage:

$ manimgx preview [OPTIONS] {FILE} [SCENE]

Arguments:

  • FILE: The scene file: a Python file defining manimgx scenes. [required]
  • SCENE: The scene (a class in the file); needed only if the file defines several.

Options:

  • -t, --time <float range>: Where the playhead starts, in seconds. [default: 0.0; x>=0]
  • -r, --resolution WxH: Pixels, e.g. 1280x720. [default: the scene's config, 1920x1080 unless set]
  • --fps <int range>: Frames per second. [default: the scene's config, 60 unless set] [x>=1]
  • --help: Show this message and exit.

manimgx present

Present a scene: its sections are the slides.

Renders the video, writes a page that plays it (it stops at the end of each section, until you go on), and opens it. Keys: → or Space next, ← back, F full screen, B black, Shift+P presenter view (notes, the next slide, a timer), C captions, ? help. A clicker works: it sends the same keys. Begin a section with self.next_section(...) in the scene.

Usage:

$ manimgx present [OPTIONS] {FILE} [SCENE]

Arguments:

  • FILE: The scene file: a Python file defining manimgx scenes. [required]
  • SCENE: The scene (a class in the file); needed only if the file defines several.

Options:

  • -o, --output <path>: The video (.mp4); the page is written beside it (.html). [default: .mp4 beside the file]
  • -r, --resolution WxH: Pixels, e.g. 1280x720. [default: the scene's config, 1920x1080 unless set]
  • --fps <int range>: Frames per second. [default: the scene's config, 60 unless set] [x>=1]
  • --pdf / --no-pdf: Also write a PDF: the picture each slide ends on, a page each. [default: no-pdf]
  • --open / --no-open: Open the page in the browser. [default: open]
  • --help: Show this message and exit.