Real-Time-Manim (RTM)
A Vulkan-accelerated, real-time rendering backend for
ManimCE. RTM drives ManimCE's own Mobject /
Animation model through a native Vulkan pipeline, so the same scene can be
watched live in a window, seeked to any frame instantly, and recorded to MP4
several times faster than the default renderer.
About this page. This is the package overview, kept plain-text on purpose (PyPI renders neither images nor diagrams). The illustrated README, the manual and a source-level walkthrough live in the repository and its wiki.
Install
pip install real-time-manim
The Windows wheel bundles vulkan_core.dll and the macOS wheel bundles
vulkan_core.dylib (Apple Silicon), so there is no build step. You need a
Vulkan-capable GPU/driver, and ffmpeg on PATH to record video.
macOS needs MoltenVK at runtime — it provides the Vulkan layer on macOS:
brew install molten-vk
Intel Macs aren't covered by the bundled dylib: build it once and drop it next
to the installed real_time_manim package:
bash native/build_mac.sh # -> dist/release/vulkan_core.dylib
Quick start
from real_time_manim import Scene, Square, BLUE
from real_time_manim.vulkan_bind import MLWindow, Create, Wait
from real_time_manim.record import fast_record_scene
class Hello(Scene):
def construct(self):
win = MLWindow(960, 540) # a real-time window
win.scene = self # required
sq = Square(side_length=1.5, color=BLUE).set_fill(BLUE, 0.6)
win.play(Create(sq), run_time=1.0)
win.play(Wait(0.5))
win.close() # required
fast_record_scene(Hello) # -> ~/Downloads/output.mp4
MLWindow opens the live window; fast_record_scene / record_scene record to
MP4. Recording starts and stops around the scene automatically, and the
transient media/ folder is cleaned up afterwards.
No separate ManimCE install, and no
import manim. RTM bundles ManimCE 0.21.0 and re-exports its whole namespace (Scene, every mobject and animation, the colours, the rate functions). Importreal_time_manim— notmanim— or class identity splits.
Highlights
- Real-time window.
MLWindowrenders at 1920×1080 @ 60 fps with no export step between code and picture. - Fast recording.
fast_record_scene(...)reads back frames straight intoffmpeg— around 1.9–2.8× faster than ManimCE Cairo (a 15-second scene: 4.6–6.6 s versus 12.8–13.9 s), windowless and at full speed by default. - Parallel frames.
jobs="auto"splits a long scene across worker processes and concatenates their segments losslessly. - Frame-accurate seeking. Any frame of a prepared scene is produced in O(1), which is what makes both the frame preview and the parallel recorder possible.
- Full ManimCE. Existing scenes run unchanged, including code that still
writes
from manim import .... - Math without LaTeX.
MathTexstrings inside a convertible subset are compiled by an in-process Typst backend (RTM_TYPST=0disables it); both Typst and LaTeX results are content-hashed and cached. - Animations. Every animation family is available: transforms, drawing, fading, movement/scaling, text, rotation, effects and grouping/timing — see the manual for the full list.
Recording
fast_record_scene(MyScene) # offline readback -> ~/Downloads/output.mp4
fast_record_scene(MyScene, "out.mp4", jobs=4) # 4 worker processes
record_scene(MyScene, "live.mp4") # capture a visible window in real time
Both accept a Scene subclass, a Scene instance or a no-arg callable, and
return a dict {out_path, windows, files, with_audio}. With out_path omitted
the output lands at ~/Downloads/output.mp4; a scene that opens several windows
gets _part2, _part3, … suffixes.
Constraints
- Output is fixed at 1920×1080 @ 60 fps; any other value is corrected and
reported with a
[rtm] forcing ...line. - One window per process, and
win.scene = selfpluswin.close()are required. - There is no
manimCLI — RTM is a library:MLWindow, the recorders,FrameServer,FramePreview.
How it works
Manim Scene
| MLWindow.play(...)
v
type dispatch (_send per mobject)
| ctypes FFI
v
vulkan_core.dll -> Vulkan pipeline -> GPU
| optional framebuffer readback
v
ffmpeg -> MP4
A Scene builds mobjects and calls MLWindow.play(...); the Python layer walks
the mobject tree and dispatches each shape to a type-specific sender; those cross
a ctypes boundary into vulkan_core.dll, which emits vertices and submits them
to a Vulkan pipeline. Every frame is presented to the window, and can optionally
be read back and piped to ffmpeg as an MP4.
LaTeX / Typst cache
Compiled formulas are content-hashed, so unchanged math is never recompiled:
from real_time_manim import restore_tex_cache, save_tex_cache, clear_tex_cache
restore_tex_cache("tex_cache") # before: warm manim's SVG folder from a saved cache
# ... run your Tex / MathTex scenes ...
save_tex_cache("tex_cache") # after: stash newly compiled SVGs
clear_tex_cache() # wipe <media>/Tex and tex_cache/ (dry_run=True to preview)
Documentation
- Repository — https://github.com/BEGINWITHF/real-time-manim
- Wiki (English) — a source-level walkthrough in eight chapters, from 01 Overview to 08 Native Layer
- Chinese manual — 144 pages, one section per API, each with a rendered sample clip: RTM-Wiki/zh_CN
- English manual — the same content in English, with the sample clips re-rendered so the on-screen labels are English too: RTM-Wiki/en_US
- Agent manual — the same material condensed for AI agents: RTM-Wiki/agent
License
Acknowledgments
- ManimCE — the mathematical animation engine
- stb_truetype — TrueType font rasterizer
- Vulkan — the graphics API
- Typst — the in-process math typesetting backend
Metadata
Release files for real-time-manim 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| real_time_manim-2.0.1.tar.gz | 1.2 MB | Without provenance | Details for real_time_manim-2.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| real_time_manim-2.0.1-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details for real_time_manim-2.0.1-py3-none-win_amd64.whl |
Total release size: 2.4 MB
Release files / real_time_manim-2.0.1.tar.gz
| Download URL | real_time_manim-2.0.1.tar.gz |
|---|---|
| Size | 1.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce04c34e63c08ed71eb10d302b2de601f96cc14c5fe542e288f092d66f1f3317
|
|
BLAKE2b-256 checksum How to use checksums |
578b4f13fd185116eb9208aa25854014d320c2ff180882d66b88d57a1062e79b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.4
|
Release files / real_time_manim-2.0.1-py3-none-win_amd64.whl
| Download URL | real_time_manim-2.0.1-py3-none-win_amd64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
d1400e408e2818d4df8a220c3e0f7f4ecb69337fb836e0740ec5adfdd30bb0fc
|
|
BLAKE2b-256 checksum How to use checksums |
0f5be9a5fba973b5da527d91e3b46d4980f0591a1df9b95f3debf449a6d8915f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.4
|
Security for real-time-manim 2.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.