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 | |
import random | |
import os | |
# Create the "snaps" directory if it doesn't exist | |
if not os.path.exists("snaps"): | |
os.makedirs("snaps") | |
# Open the video file | |
video_capture = cv2.VideoCapture("video.mp4") |