Skip to content

Instantly share code, notes, and snippets.

@yokeshrana
Created March 8, 2021 08:55
Show Gist options
  • Save yokeshrana/793312db83eb7bd029feeeedabc9abaa to your computer and use it in GitHub Desktop.
Save yokeshrana/793312db83eb7bd029feeeedabc9abaa to your computer and use it in GitHub Desktop.
Reading Video using Opencv
import cv2
vid = cv2.VideoCapture("Resources/test_video.mp4")
#since video is stream of pictures we have to use something else here
while True:
success,img=vid.read()
if success:
cv2.imshow("Video", img)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment