Search code examples
backgroundmanim

Is there a way to exporto Maniim videos without background


I'm learning Manim and I would like to know if it is possible to generate videos without the background.

I saw that you can define the background color in a extern file, but I don't know how to render the video without the background.


Solution

  • https://docs.manim.community/en/stable/faq/general.html?highlight=transparent%20video#can-manim-render-a-video-with-transparent-background

    Can Manim render a video with transparent background?

    Yes: simply pass the CLI flag -t (or its long form --transparent). Note that the default video file format does not support transparency, which is why Manim will output a .mov instead of a .mp4 when rendering with a transparent background. Other movie file formats that support transparency can be obtained by passing --format=webm or --format=gif.