Skip to content

Video editing with Python

fix issue #357, which makes real problem more obvious (media file does not exist

Billy Earneyf4a460646f87
diff --git a/moviepy/video/io/VideoFileClip.py b/moviepy/video/io/VideoFileClip.py
index 92b89c09..77dc26d1 100644
--- a/moviepy/video/io/VideoFileClip.py
+++ b/moviepy/video/io/VideoFileClip.py
@@ -54,8 +54,8 @@ class VideoFileClip(VideoClip):
# Make a reader
pix_fmt= "rgba" if has_mask else "rgb24"
- reader = FFMPEG_VideoReader(filename, pix_fmt=pix_fmt)
- self.reader = reader
+ self.reader = None #need this just in case FFMPEG has issues (__del__ complains)
+ self.reader = FFMPEG_VideoReader(filename, pix_fmt=pix_fmt)
# Make some of the reader's attributes accessible from the clip
self.duration = self.reader.duration
self.end = self.reader.duration