i am unable to play video from file. the code is given as follows:
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()
add a comment