Skip to content

Conversation

@jeertmans
Copy link
Contributor

Draft implementation of #442.

The goals are to:

  • avoid calling FFMPEG each time using subprocesses;
  • mitigate the FFMPEG installation issues by providing direct binding (to check)

The current PR seems to improve rendering time by a factor close to 1.5 ~ 2.0, but I should do more testing to further check this.

A basic test case is the following:

import random

from manim import *

random.seed(1234)


class Speed(Scene):
    def construct(self):
        for _ in range(10):
            self.play(Write(DecimalNumber(random.random())))
            self.clear()

TODO list:

  • remove all subprocess call (at least one is left for audio concat)
  • remove all mentions of writing_process and FFMPEG needs
  • update the docs?
  • update and add unit tests

Closes #442

@behackl
Copy link
Member

behackl commented Dec 7, 2023

I've been working on that too in #3501, with the difference that I have a working documentation build and fewer failing tests ;-)

You managed to pass a few more of the current options though, it might make sense to join forces.

@behackl behackl marked this pull request as draft December 7, 2023 17:18
@behackl
Copy link
Member

behackl commented Dec 7, 2023

I've now absorbed your changes in #3501, except for the change to write_frame that allows passing a number of frames to be written. (But that probably makes sense to include too.)

@jeertmans
Copy link
Contributor Author

Nice! Should I close this one then?

note that I the frame repeat in the write frame function because it does not make sense to convert multiple times the same array to a frame

@jeertmans jeertmans closed this Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Rejected

Development

Successfully merging this pull request may close these issues.

Using Pyav for Handling Ffmpeg

2 participants