Metadata-Version: 2.4
Name: manim-videos
Version: 0.2.0
Summary: Embed videos in Manim scenes and Manim Slides presentations
Project-URL: Homepage, https://github.com/jungerm2/manim-videos
Project-URL: Documentation, https://jungerm2.github.io/manim-videos
Project-URL: Repository, https://github.com/jungerm2/manim-videos
Project-URL: Bug Tracker, https://github.com/jungerm2/manim-videos/issues
Author: manim_videos contributors
License: MIT
License-File: LICENSE
Keywords: animation,manim,manim-slides,presentation,video
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Multimedia :: Video
Classifier: Topic :: Scientific/Engineering :: Visualization
Requires-Python: >=3.10
Requires-Dist: manim>=0.18
Requires-Dist: moviepy>=2.0
Provides-Extra: slides
Requires-Dist: manim-slides>=5.0; extra == 'slides'
Description-Content-Type: text/markdown

<p align="center">
  <picture>
    <source media="(prefers-color-scheme: dark)" srcset="https://jungerm2.github.io/manim-videos/latest/_static/logo_dark.svg">
    <img alt="manim-videos logo" src="https://jungerm2.github.io/manim-videos/latest/_static/logo_light.svg" width="500">
  </picture>
</p>

# Manim Videos

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

Instead of decoding video frames one-by-one into `ImageMobject`s, `manim_videos`
renders a transparent placeholder during Manim's normal pass and then uses
[MoviePy](https://zulko.github.io/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](https://github.com/ManimCommunity/manim), but may work with [ManimGL](https://3b1b.github.io/manim/).

## Quick Start

Install manim-videos with:
```bash
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:

```python
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:

```bash
manim -pql my_scene.py MyScene
```

See the [documentation](https://jungerm2.github.io/manim-videos/) for more!
