In this post, we will see how to resolve Why is my manim scene being converted into a png instead of an mp4
Question:
I have a python file that I am using to program a few scenes in manim. I looked over the Quick Start documentation, and everything works fine. But when I made another scene, calledThreeSquares
, it converts the file into a black png. I have no idea what’s going wrong, what should I do?Code for the function:
manim -pql scene.py ThreeSquares
(scene.py is the file name), and that produced a black png.I’ve also tried
python -m manim scene.py ThreeSquares -p -ql
, and that yielded the same result.I’ve also tried to look in the documentation for any reason as to why this is happening, and I came up with nothing. I’ve also looked around on StackOverflow for this and there doesn’t seem to be problems pertaining to this specific result.
Best Answer:
the solution is very simple, you have written you logic in a function namedconstructor
instead of construct
in the 4rd line which is what manim looks for to render the video. Please correct the function name and it should work.self.wait()
in the last line (this does not cause an error though). Hope this helps thankyou!If you have better answer, please add a comment about this, thank you!
Source: Stackoverflow.com