I'm trying to play an avi file with python cv2
cap = cv2.VideoCapture('lot1.avi')
but the cap.isOpen() is always False.
Dose it have to do with the file type? do I have to install somthing?
Thanks...
I'm trying to play an avi file with python cv2
cap = cv2.VideoCapture('lot1.avi')
but the cap.isOpen() is always False.
Dose it have to do with the file type? do I have to install somthing?
Thanks...
I solved the problem by adding opencv_ffmpeg.dll to the c:/python27/ folder and changing it's name to opencv_ffmpeg246.
I found the answer here: https://stackoverflow.com/a/17672734/2154827
Try to use:
cv.CaptureFromFile()
There is some code you can look at here if you run in to any more problems: Watch Video in Python with OpenCV. Hope this helps you!