You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I need to process a lot of videos, but not many at a time. However I keep running into memory issues, even after upgrading hardware. I think I have tracked down the issue and any help would be appreciated.
It appears that the ffmpeg_reader/writer stays open even if a clip is deleted. Here is an example:
import psutil
from moviepy.editor import *
import time
initial_set = psutil.get_pid_list()
clip = VideoFileClip("sync_test2/1/GOPR0185.MP4", audio=False)
new_set = psutil.get_pid_list()
new_ps = set(new_set)-set(initial_set)
print new_ps
for new_p in new_ps:
p = psutil.Process(new_p)
print p.name
print p.get_memory_percent()
del clip
time.sleep(2) # give subprocess time to close the processes
check_set = psutil.get_pid_list()
for new_p in new_ps:
if new_p in check_set:
print str(new_p) + " is still open!"
When I run this I get:
set([19228, 19229])
ffmpeg
1.26245461454
ffmpeg
0.0
19228 is still open!
19229 is still open!
So my questions are: Is it possible to explicitly close the reader/writer after I am done with a clip? Is there a different way to delete a the clip? Is this a bug? Is there a different way for me to test this?
I can also try to fix this in my fork if you can point me to a good place to start.
Thanks.
The text was updated successfully, but these errors were encountered:
Hi,
I need to process a lot of videos, but not many at a time. However I keep running into memory issues, even after upgrading hardware. I think I have tracked down the issue and any help would be appreciated.
It appears that the ffmpeg_reader/writer stays open even if a clip is deleted. Here is an example:
When I run this I get:
So my questions are: Is it possible to explicitly close the reader/writer after I am done with a clip? Is there a different way to delete a the clip? Is this a bug? Is there a different way for me to test this?
I can also try to fix this in my fork if you can point me to a good place to start.
Thanks.
The text was updated successfully, but these errors were encountered: