Skip to content

About

Embed videos in Manim scenes and Manim Slides presentations

Resources

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

40 Commits

Folders and files

Repository files navigation

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!

About

Embed videos in Manim scenes and Manim Slides presentations

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages