CLI flags and configuration¶
Command Line Interface¶
To run manim, you need to enter the directory at the same level as manimx/
and enter the command in the following format into terminal:
manimx <code>.py <Scene> <flags>
# or
manim-render <code>.py <Scene> <flags>
<code>.py
: The python file you wrote. Needs to be at the same level asmanimx/
, otherwise you need to use an absolute path or a relative path.<Scene>
: The scene you want to render here. If it is not written or written incorrectly, it will list all for you to choose. And if there is only oneScene
in the file, this class will be rendered directly.<flags>
: CLI flags.
Some useful flags¶
-w
to write the scene to a file.-o
to write the scene to a file and open the result.-s
to skip to the end and just show the final frame.-so
will save the final frame to an image and show it.
-n <number>
to skip ahead to then
’th animation of a scene.-f
to make the playback window fullscreen.
All supported flags¶
flag |
abbr |
function |
---|---|---|
|
|
Show the help message and exit |
|
|
Display the version of manimx |
|
|
Render the scene as a movie file |
|
|
Skip to the last frame |
|
|
Render at a low quality (for faster rendering) |
|
|
Render at a medium quality |
|
Render at a 1080p quality |
|
|
Render at a 4k quality |
|
|
|
Show window in full screen |
|
|
Scene will stay paused during wait calls until space bar or right arrow is hit, like a slide show |
|
|
Save each frame as a png |
|
|
Save the video as gif |
|
|
Render to a movie file with an alpha channel |
|
|
|
|
|
Write all the scenes from a file |
|
|
Automatically open the saved file once its done |
|
Show the output file in finder |
|
|
Guide for automatic configuration |
|
|
Name for the movie or image file |
|
|
|
Start rendering not from the first animation, but from another, specified by its index. If you passing two comma separated values, e.g. “3,6”, it will end the rendering at the second value. |
|
|
Creates a new file where the line |
|
|
Resolution, passed as “WxH”, e.g. “1920x1080” |
|
Frame rate, as an integer |
|
|
|
Background color |
|
Leave progress bars displayed in terminal |
|
|
Directory to write video |
|
|
Path to the custom configuration file |
|
|
Level of messages to Display, can be DEBUG / INFO / WARNING / ERROR / CRITICAL |
custom_config¶
In order to perform more configuration (about directories, etc.) and permanently
change the default value (you don’t have to add flags to the command every time),
you can modify custom_config.yml
. The meaning of each option is in
page custom_config.
You can also use different custom_config.yml
for different directories, such as
following the directory structure:
manim/
├── manimx/
│ ├── animation/
│ ├── ...
│ ├── default_config.yml
│ └── window.py
├── project/
│ ├── code.py
│ └── custom_config.yml
└── custom_config.yml
When you enter the project/
folder and run manimx code.py <Scene>
,
it will overwrite manim/default_config.yml
with custom_config.yml
in the project
folder.
Alternatively, you can use --config_file
flag in CLI to specify configuration file manually.
manimgl project/code.py --config_file /path/to/custom_config.yml