ManimCommunity / manim

A community-maintained Python framework for creating mathematical animations.
https://www.manim.community
MIT License
20.06k stars 1.48k forks source link

GIF generation doesn't work -i #477

Closed FilipeMarch closed 3 years ago

FilipeMarch commented 3 years ago

I was used to create GIFs on 3b1b MANIM by using code like this:

python -m manim script.py GIFGenerate -i

GIFGenerate

Although I am using the same code/commands, I can't generate GIFs on ManimCE.

huguesdevimeux commented 3 years ago

Thanks for the report :D

leotrs commented 3 years ago

@FilipeMarch can you please follow the steps outlined in the issue template?

Include at least:
1. Steps to reproduce the issue (e.g. the command you ran)
2. The unexpected behavior that occurred (e.g. error messages or screenshots)
3. The environment (e.g. operating system and version of manim)

For step one, can you please post the scene code you are using? Or find a minimal scene that reproduces the bug? What version of manim CE are you using? Is there any error message? Are there any files generated? etc etc etc etc

FilipeMarch commented 3 years ago

TL;DR I started answering what you asked step by step and writing the results and suddenly and on the end no bug occurred. Now, my old manim-master folder is not generating GIFs correctly, but I don't care anymore at this point, as I'm looking forward to only use ManimCE.

@FilipeMarch can you please follow the steps outlined in the issue template?

Sure

  1. Steps to reproduce the issue (e.g. the command you ran)
    • On Linux Mint 19.3 Cinnamon, create virtualenvironment with python 3.8.1 for ManimCE:
      pyenv virtualenv 3.8.1 ManimCE
    • Activate the environment and install ManimCE
      pyenv activate ManimCE
      python -m pip install manimce

      Create a script.py file in any folder and paste the following code:

      class GIFGenerate(Scene):
      def construct(self):
      text = TextMobject('ABC')
      self.play(Write(text))
      self.wait()

      Open that folder on terminal, with ManimCE environment activated, and run this:

      manim script.py GIFGenerate -i
      File ready at                                               
      /home/user/desktop/                         
      manimCE/media/videos/script/1440p6                         
      0/GIFGenerate.mp4 

      Open the folder /home/user/desktop/manimCE/media/videos/script/1440p60 and you will see a .mp4 file there. Also, there is a GIF there. It is the GIF I needed. LOL

I could swear I followed the exact same steps yesterday but didn't find the .GIF image. I can see on the folder /home/user/manim-master/media/videos/script/1440p60 the GIF I generated yesterday to post this issue: GIFGenerate.gif. I generated it with manim-master.

But on the folder: /home/user/desktop/manimCE/media/videos/script/1440p60 I only had a GIFGenerate.mp4 with all frames black. So I posted the issue.

Now manim-master is not generating GIFs correctly and manimCE is doing it correctly, this is the most strange thing that happened to me on the last 48h. Anyway, I think you can close the issue if you can generates .gif files correctly as I am now with ManimCE. I have no idea what really happened here.

leotrs commented 3 years ago

Thanks for the detailed answer. It sounds like you might have mixed up 3b1b/manim with manim-ce. That happens! Please feel free to open a new issue if you find the bug again.