You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was putting together a sequence of frames with ImageSequenceClip and saw that my animation seemed to hang at a certain point as if there were a repeated frame. However, I noticed the problem went away when I switched from 24 to 30 fps.
I wrote a program to reproduce the issue that makes ImageSequenceClips out of the same set of frames at different fps's and looks for repeated frames.
from moviepy.editor import *
frames_filenames = []
# set of frames that are all different
for i in range(20):
frames_filenames.append('frames2/processing/' + str(i) + 'frame.png')
for frames_per_second in range(1,31):
print("\nfps: " + str(frames_per_second))
movie = ImageSequenceClip(frames_filenames, fps=frames_per_second)
lastPixels = []
count = 0
for frame in movie.iter_frames():
# band of pixels that is different in every frame
pixels = frame[306,560:600,0]
if len(pixels) == len(lastPixels):
tuple = zip(pixels, lastPixels)
difference = [x for x in tuple if x[0] == x[1]]
if len(difference) == 600 - 560:
print("frame " + str(count))
print(difference)
print("\n")
lastPixels = pixels
count += 1
I was putting together a sequence of frames with ImageSequenceClip and saw that my animation seemed to hang at a certain point as if there were a repeated frame. However, I noticed the problem went away when I switched from 24 to 30 fps.
I wrote a program to reproduce the issue that makes ImageSequenceClips out of the same set of frames at different fps's and looks for repeated frames.
Here is the output of this program:
The text was updated successfully, but these errors were encountered: