Last active
December 23, 2020 10:20
-
-
Save CreedsCode/acf5cc36cd7589553931c1ac351fb65c to your computer and use it in GitHub Desktop.
Splice the images out of a video
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
vidcap = cv2.VideoCapture('video.mp4') | |
success, image = vidcap.read() | |
count = 1 | |
while success: | |
cv2.imwrite("output/image_%d.jpg" % count, image) | |
success, image = vidcap.read() | |
print('Saved ', count) | |
count += 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment