cap = cv2.VideoCapture("horse.mp4")
img_num = 1
while True:
ret, frame = cap.read()
if ret == False:
break
# Save frames using cv2.imwrite
cv2.imwrite("image_{}.jpg".format(img_num), frame) # Save image localy
img_num+=1