Closed lwgray closed 7 years ago
VideoFileClip()
of moviepy
library
The error arises at Line 153: input_video = VideoFileClip(filename)
A detailed discussion regarding this behaviour exists at moviepy
repository: see this
The immediate solution, in my opinion, would be to generate the summarized video in a child process that is: execute the statement (Line 244) get_summary(filename=movie_filename, subtitles=subtitle_filename)
in a child process and kill the process immediately after its execution that is before we attempt to delete the download files.
I'd like to work on this, unless the issue is already taken.
Sure @ilimugur Go ahead 👍
Ahead I went, and created a pull request. Tried the fix on a machine running Windows and it seems to have fixed the issue.
Expected Behavior
We expect sum.py to delete original mp4 and srt files unless otherwise specified
Current Behavior
Traceback (most recent call last): File "sum.py", line 252, in
os.remove(movie_filename)
WindowsError: [Error 32] The process cannot access the file because it is being used by another process: u'1.mp4'
Possible Solution
I do not know 😞
Steps to Reproduce the Problem
Detailed Description
Upon running sum.py on a windows 10 platform, the script is interrupted with a windowsError stating that the removal of files can't take place because one of the file is still in use.
Specifications