from moviepy.editor import VideoFileClip import cv2 size= (128, 128) video_file='/home/gyglim/scratch_gygli/gifscom/shot_detection/debug_videos/UEoUURJ1Dck.mp4' v1 = VideoFileClip(video_file, target_resolution=size, resize_algorithm='bilinear').subclip(0, 60) def read_resized(): for f in v1.iter_frames(): pass v2 = VideoFileClip(video_file).subclip(0, 60) def read_and_resize_cv2(): for f in v2.iter_frames(): f2=cv2.resize(f, size, interpolation=cv2.INTER_LINEAR) v3 = VideoFileClip(video_file).subclip(0, 60).resize(size) def read_and_resize_moviepy(): for f in v3.iter_frames(): pass