Skip to content

Instantly share code, notes, and snippets.

@sergiolucero
Created July 23, 2022 03:28
Show Gist options
  • Save sergiolucero/f2949d653b1b4bd8c7988eadba025444 to your computer and use it in GitHub Desktop.
Save sergiolucero/f2949d653b1b4bd8c7988eadba025444 to your computer and use it in GitHub Desktop.
movie_maker
import glob
import cv2
images = glob.glob('Plot*.png')
print('nImages:', len(images))
height, width, layers = cv2.imread(images[0]).shape
video = cv2.VideoWriter('video.avi', 0, 1, (width,height))
for image in images:
video.write(cv2.imread(image))
cv2.destroyAllWindows()
video.release()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment