Skip to content

Instantly share code, notes, and snippets.

@prerakmody
Created June 23, 2020 18:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prerakmody/441e38e576ca43ba9a9c7dd846acd3c7 to your computer and use it in GitHub Desktop.
Save prerakmody/441e38e576ca43ba9a9c7dd846acd3c7 to your computer and use it in GitHub Desktop.
Make Video
import cv2
import tqdm
images_path = []
video_path = ''
frame = cv2.imread(str(images_path[0]))
height, width, layers = frame.shape
video = cv2.VideoWriter(str(video_path), cv2.VideoWriter_fourcc('X','V','I','D'), 3, (width,height))
with tqdm.tqdm(total=len(images_path)) as pbar:
for image_path in sorted(images_path):
pbar.update(1)
video.write(cv2.imread(str(image_path)))
video.release()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment