Reactivation of the gif export
See original GitHub issueThere are still the optional arguments:
"-i", "--save_as_gif" for saving scences into gif.
This feature was added to 3b1b’s repo here https://github.com/3b1b/manim/commit/c42ae8a55bb2f1ef8259a719f17eaf519c46f3f8
and removed here https://github.com/3b1b/manim/commit/61bb4944fad2ee889145bbf8a3253fb07c71bf7d where Grant wrote:
It seems strange to me that the “-c copy” line breaks things when you’re trying to make a gif, is there a more natural way to address whatever the underlying issue is here? In a perfect world, we should be able to make things so that if you set “movie_file_extension” in the SceneFileWriter to “.gif”, it figures out the settings it needs and renders the gif. Having a bunch of extra attributes for gifs strikes me as redundant.
So my idea would be to add to manim/scene/scene_file_writer.py something like
if self.save_as_gif:
os.system("ffmpeg -i PATH_TO_VIDEO/input.mp4 output.gif")
This way, the video get’s first rendered to mp4 and then to gif, but I think that’s the most forward option.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (9 by maintainers)

Top Related StackOverflow Question
Sounds good to me.
I also want to point out that having a flag that changes the file type of the output would be useful for add-ons. For example, my PowerPoint add-on adds the
--save_as_pptxflag, which could be removed in favor of adding.pptxas a valid output format. E.g. `-c [ mp4 | mov | gif | pptx | … ]@leotrs Yeah, I just made one.