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

Unclosed processes. #19

Closed
karpitsky opened this issue Feb 27, 2014 · 5 comments · Fixed by #570
Closed

Unclosed processes. #19

karpitsky opened this issue Feb 27, 2014 · 5 comments · Fixed by #570

Comments

@karpitsky
Copy link

When I'm trying to get video duration

video_clip = VideoFileClip(video_file_path)
print video_clip.duration

I see 2 processes, that are never closed
_ ffmpeg -i /tmp/9ea28576d6154d568b755f4cd9718c77.mp4 -f image2pipe -pix_fmt rgb24 -vcodec rawvideo -
_ ffmpeg -i /tmp/9ea28576d6154d568b755f4cd9718c77.mp4 -vn -f s16le -acodec pcm_s16le -ar 44100 -ac 2 -

Can you advise?

@Zulko
Copy link
Owner

Zulko commented Feb 27, 2014

These are the video reader and audio reader respectively. If you are not going use the video_clip for anything else after you have read the duration, close these readers with

del video_clip.reader
del video_clip.audio.reader

Alternatively you can use a reader directly:

from moviepy.video.io.ffmpeg_reader import FFMPEG_VideoReader('myvideo.mp4')
reader = FFMPEG_VideoReader('myvideo.mp4')
print reader.duration
del reader

you can also do explicitly:

reader.close_proc()

@karpitsky
Copy link
Author

I've checked all the variants but I still see unclosed processes.
Can you give me another advise?

@Zulko
Copy link
Owner

Zulko commented Mar 3, 2014

No, sorry. Are these the same processes as before ?
I won't have much time to investigate. If you find a solution I'll
happily merge the commit.

Le 03/03/2014 12:30, Michael Karpitsky a écrit :

I've checked all the variants but I still see unclosed processes.
Can you give me another advise?


Reply to this email directly or view it on GitHub
#19 (comment).

@grimley517 grimley517 mentioned this issue Feb 3, 2015
@mbeacom
Copy link
Collaborator

mbeacom commented Feb 25, 2017

@karpitsky This should be resolved in the latest pypi release v0.2.2.13. Can you please verify that this is still an issue?

@mbeacom
Copy link
Collaborator

mbeacom commented May 25, 2017

Closing due to no response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants