Zulko / moviepy

Video editing with Python
https://zulko.github.io/moviepy/
MIT License
12.36k stars 1.55k forks source link

ffmpeg process running after even after using close() (ZOMBIE PROCESS) #1738

Open vaccarieli opened 2 years ago

vaccarieli commented 2 years ago
        video = VideoFileClip(instaStory).subclip(15,30)

        estrenoGif = VideoFileClip(estrenoGif, has_mask=True).set_duration(video.duration).set_pos(("center", 1300)) 

        image = ImageClip(imagePath).set_duration(video.duration)

        (CompositeVideoClip([image, video.set_pos(("center")), estrenoGif])
                .write_videofile(f"{instaStory}.(instaStory).mp4", codec='libx264'))

        sleep(3)

        video.close(), estrenoGif.close(), image.close()

-->

Expected Behavior

After closing clips, I expect ffmpeg to not be still running as a process in the background as a ZOMBIE.

Actual Behavior

when I do pgrep ffmpeg, I still get:

7435 ffmpeg 7446 ffmpeg

I can remove files and everything while running my code, so don't know where that process is coming from.

Image

2022-03-16 17_53_41-Media viewer

Specifications

vaccarieli commented 2 years ago

I just opened the issue because I got a ForLoop that sleeps for X time, so in the first iteration the zombie process for FFMPEG they don't show, so I thought it was solved, but rigth after the second iteration the process for ffmpeg just before sleeps won't close and leave it open.