I want just to ask if you try with other codec like 'XVID', other thing - did you check if every img is read by your code. Ensure that self.length
is defined and represents the duration of the video in seconds. If self.length
is zero or not set, total_frames
will be zero, and frames_per_image
will be incorrectly calculated.