Skip to content

Latest commit

 

History

History
45 lines (32 loc) · 1.5 KB

README.md

File metadata and controls

45 lines (32 loc) · 1.5 KB

manim-videos logo

Manim Videos

Efficiently embed video clips in Manim scenes and Manim Slides presentations.

Instead of decoding video frames one-by-one into ImageMobjects, manim_videos renders a transparent placeholder during Manim's normal pass and then uses MoviePy to composite the target video onto the rendered partial movie file in a single post-processing step.

Note: This package is only tested against Manim Community Edition, but may work with ManimGL.

Quick Start

Install manim-videos with:

pip install manim-videos

Then add the VideoMixin to your scene class, and add your video to your scene using the VideoMObject class and OverlayVideo animation:

from manim import *
from manim_videos import VideoMixin, VideoMObject, OverlayVideo


class MyScene(VideoMixin, Scene):
    def construct(self):
        vid = VideoMObject("my_video.mp4")
        self.play(OverlayVideo(vid))

Which can be rendered and previewed using the following command:

manim -pql my_scene.py MyScene

See the documentation for more!