i am unable to play video from file. the code is given as follows:

asked 2015-03-31 09:49:03 -0600

updated 2015-03-31 10:01:40 -0600

 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()
edit retag flag offensive close merge delete