I have videos I need to grab frames of and store as png images.
I need only frames from specific times.
These times are in microseconds.
How can I grab only these frames?
ret, frame = cap.read()
cv2.imshow("Video", frame)
cap = cv2.VideoCapture("video.mp4")
count = 0
while vidcap.isOpened():
if count == int(308608300 / 1000000):
cv2.imwrite(os.path.join(path_output_dir, '%d.png') % count)
cv2.destroyAllWindows()