Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Writing of CompositeVideoClip hangs/slows to a crawl in drawing.py #1150

Closed
zamirkhan opened this issue Apr 16, 2020 · 2 comments
Closed

Writing of CompositeVideoClip hangs/slows to a crawl in drawing.py #1150

zamirkhan opened this issue Apr 16, 2020 · 2 comments
Labels
bug Issues that report (apparent) bugs. performance Speed/performance of code or individual functionality.

Comments

@zamirkhan
Copy link

We use moviepy extensively, writing thousands of clips. I recently ran into one video which caused our system to hang. There is no obvious corruption to the file, but when it is part of a CompositeVideoClip, the writing of that clip never finishes and whenever I kill the process, below is where the stack trace is executing at:

 File "/usr/local/lib/python3.7/site-packages/moviepy/Clip.py", line 95, in get_frame
    return self.make_frame(t)
  File "/usr/local/lib/python3.7/site-packages/moviepy/video/compositing/CompositeVideoClip.py", line 118, in make_frame
    f = c.blit_on(f, t)
  File "/usr/local/lib/python3.7/site-packages/moviepy/video/VideoClip.py", line 586, in blit_on
    return blit(img, picture, pos, mask=mask, ismask=self.ismask)
  File "/usr/local/lib/python3.7/site-packages/moviepy/video/tools/drawing.py", line 45, in blit
    1.0 * mask * blitted + (1.0 - mask) * blit_region)

-->

I know this video is partly at fault, but any idea what might be going on and how this could be prevented?

@tburrows13
Copy link
Collaborator

It seems that CompositeVideoClips have been causing quite a few performance problems lately. I see that you've found #1145 which contains a fix that you could try yourself (which stems from the issues in #1143).

@tburrows13 tburrows13 added the bug Issues that report (apparent) bugs. label Apr 17, 2020
@keikoro keikoro added the performance Speed/performance of code or individual functionality. label Oct 3, 2020
@keikoro
Copy link
Collaborator

keikoro commented Jan 5, 2022

I think this got fixed in #1342. Feel free to reopen if I'm mistaken.

@keikoro keikoro closed this as completed Jan 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues that report (apparent) bugs. performance Speed/performance of code or individual functionality.
Projects
None yet
Development

No branches or pull requests

3 participants