-
Notifications
You must be signed in to change notification settings - Fork 1
Getting Started
Audience: users who want to use real-time-manim to render and record scenes. For internals see Architecture and Internals.
- Windows 10/11 (64-bit)
- Python 3.11+
- A Vulkan-capable GPU and current graphics driver
-
ffmpegon yourPATH(only needed for recording)
The package is published on PyPI:
pip install real-time-manimThe wheel bundles vulkan_core.dll and the window icon, so no build step is
needed to render. (Building from source is covered in
Building the DLL.)
Open a real-time window and draw a square:
from manim import Scene, Square, BLUE
from real_time_manim.vulkan_bind import MLWindow, Create, Wait
class Hello(Scene):
def construct(self):
win = MLWindow(960, 540) # opens a live Vulkan window
win.scene = self # bind the scene
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()
Hello().construct()Run it and a window titled Real Time Manim appears and animates the square.
Recording is wrapped so you never touch low-level hooks:
from real_time_manim.record import fast_record_scene, record_scene
fast_record_scene(Hello) # offline → ~/Downloads/output.mp4
fast_record_scene(Hello, "clip.mp4") # custom path
record_scene(Hello, "live.mp4", fps=30) # record against a live window-
fast_record_sceneis offline: it hides the window, reads frames straight from the Vulkan framebuffer and pipes them to ffmpeg. Fast, no flashing window. -
record_scenecaptures a visible live window in a background thread.
Both return a dict with the produced paths, and both clean up the transient
media/ folder automatically afterwards. See Recording and the
API Reference for every option.
When your scene contains Tex/MathTex, warm and re-store the LaTeX cache so
formulas are compiled once and reused:
from real_time_manim.util import restore_tex_cache, save_tex_cache
from real_time_manim.record import fast_record_scene
restore_tex_cache("tex_cache") # warm manim's SVG dir
fast_record_scene(MyLatexScene, "eq.mp4") # record + auto media cleanup
save_tex_cache("tex_cache") # stash any newly compiled SVGsSee Math Rendering and the util docs in the
API Reference.
The published package is core-only. To try the engine quickly, model scenes on the Getting-Started examples above, browse the supported animations in the API Reference, and read Recording and Math Rendering for the specifics.