import cv2 cap = cv2.VideoCapture("m.avi") while(cap.isOpened()): ret, frame = cap.read() print cap.grab() cv2.imshow('frame',frame) if cv2.waitKey(1) & 0xFF == ord('q'): break
cap.release() cv2.destroyAllWindows()
1 | initial version |
import cv2 cap = cv2.VideoCapture("m.avi") while(cap.isOpened()): ret, frame = cap.read() print cap.grab() cv2.imshow('frame',frame) if cv2.waitKey(1) & 0xFF == ord('q'): break
cap.release() cv2.destroyAllWindows()
2 | No.2 Revision |
import cv2
cap = cv2.VideoCapture("m.avi")
while(cap.isOpened()):
ret, frame = cap.read()
print cap.grab()
cv2.imshow('frame',frame)
if cv2.waitKey(1) & 0xFF == ord('q'):