This is my first time asking so this is a rather basic question. I'm trying to play saved videos using Anaconda on Windows, but for some reason nothing is playing. The intent is to play the current file, and then progress up to visual tracking in real time. Here is my code:
import numpy as np
import cv2
cap = cv2.VideoCapture('Animal3.h264')
while(cap.isOpened()):
print 'opened'
ret, frame = cap.read()
gray = cv2.cvtColor(frame, cv2.Color_BGR2GRAY)
cv2.imshow('frame', gray)
if cv2.waitKey(25) & 0xFF == ord('q'):
print 'break'
break
cap.release()
cv2.destroyAllWindows()
print 'end'
And when I run it nothing happens. It just tells me what file I'm running out of. What am I doing wrong?