Manim does’t produce video – Production of a frame-by-frame video instead

  Kiến thức lập trình

guys!

I have a huge problem. I created a YouTube channel to help people in mathematics like 3b1b YouTube channel does. He uses Manim software (Grant Sanderson, the person who created it, the same person in 3b1b) to animate mathematical topics, such as Linear Algebra transformations, and whatnot. Of course I am a beginner using Manim.

Getting the point of the problem, I am trying to use Manim and the Manim Sideview extension for Visual Studio Code, but when I’m trying to play my whole preview animation, I am getting frame videos at plain_movie_files file and also:

Manim Sideview: Predicted output file does not exist at "c:UsersInter BayamonDocumentsYoyo's TutoringAnimationsmediavideosmod3_clock1080p60Mod3Clock.mp4" Make sure that the designated video directories are reflected in the extension log.

Of course that implies that I need to move the frame videos from plain_movie-files to 1080p60 and name them accordingly to make them work and see each frames, I believe. However, what I want is to make a single video without using a video editor app/website to concatenate every frame into one whole video and not get the same error again. Not only that, but with animation I want to create.

This is what I did:

from manim import *

class Mod3Clock(Scene):
    def construct(self):
        # Create the outer circle of the clock
        clock_circle = Circle(radius=2)
        self.play(Create(clock_circle))

        # Create the ticks and numbers
        for i in range(3):
            angle = i * 2 * PI / 3  # 0, 120, 240 degrees
            tick = Line(start=2.5 * np.array([np.cos(angle), np.sin(angle), 0]), 
                        end=2 * np.array([np.cos(angle), np.sin(angle), 0]))
            number = MathTex(f"{i}")
            number.move_to(1.5 * np.array([np.cos(angle), np.sin(angle), 0]))
            self.play(Create(tick), Write(number))

        # Create the hands of the clock
        hour_hand = Line(ORIGIN, 1 * UP, color=BLUE)
        hour_hand.add_updater(lambda h: h.set_angle(-PI / 2 + (PI / 3) * self.time))

        minute_hand = Line(ORIGIN, 1.5 * UP, color=RED)
        minute_hand.add_updater(lambda m: m.set_angle(-PI / 2 + (2 * PI / 3) * self.time))

        self.add(hour_hand, minute_hand)
        self.wait(9)  # Wait to show the hands moving

The code file is called mod3_clock.py and is saved in the Animations folder.

Help! Thanks.

New contributor

Joshua Ortiz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

LEAVE A COMMENT