-
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
defunct ffmpeg processes left even after clip.close() #745
Comments
Thank you for references. I noticed that, defunct ffmpeg processes are left only when the video being read has an audio associated with it. I managed to figure out that subclip() on the audio was causing the problem. I added outplace decorator to subclip method in Clip.py and then it stopped leaving zombie processes behind. Original Clip.py:
After adding outplace decorator
I'm not sure if it is a legit fix or just co-incidence. |
Update: Adding the outplace operator isn't the solution. After going through source code for couple of times, I noticed that the steps used to close ffmpeg video reader are same as steps used to close ffmpeg audio reader except one step which is
I think it is a legit fix. I'm not sure if someone else has pointed this out earlier. Thanks! |
Fixed in #1185. |
I tried following snippets in ipython terminal.
Snippet 1:
After doing clip.close(), I checked
There is one ffmpeg process left in memory.
I thought this happened because of loss of reference to ffmpeg process due to 2 outplace operations (subclip and resize), so I tried following script.
Snippet2:
Again I did,
ps -ef | grep ffmpeg
It gave similar output. There is one defunct process left in memory.
What is the right way of removing the ffmpeg instances?
Thanks!
The text was updated successfully, but these errors were encountered: