-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Memory Leak In VideoFileClip #96
Comments
Can you provide an example of where it doesn't do what you want ? That would clarify where we are going and help me see the problems. Also can you remind me what to use to check for memory allocations in Python ? |
Copy this script in a folder with an image named "test.gif".
Run the script without a del argument
Run the script with a del argument
The second run is what I want to see, moviepy.video.io.VideoFileClip.VideoFileClip should no longer be in the heap after the function call. |
Thanks for the explanations, I think I fixed it. Can you try the new version (PyPI or github) and tell me it it works ? |
Still got a memory leak or something for me. Each time I write out a video file, more ffmpeg processes that don't go away are created and more memory is used. (v0.2.1.9.07 from pip on Linux) |
With exactly the same code as before ? |
Yep. Same code. |
I think this is resolved now. I'm not experiencing this problem anymore. |
Sounds like this problem disappeared a while ago. Closing. |
VideoFileClip defines a
__del__
method and has a reference cycle https://github.com/Zulko/moviepy/blob/master/moviepy/video/io/VideoFileClip.py#L74. This causes the gc to ignore any VideoFileClip instances, https://docs.python.org/2/library/gc.html#gc.garbage. An immediate solution is todel video_file_clip.make_frame
for all VideoFileClip instances. But it should not be my responsibility to clean up VideoFileClip.The text was updated successfully, but these errors were encountered: