VideoCapture from file [closed]
Hi,
I'm kinda new to opencv, and cant figure out what i'm doing wrong while opening a video file with VideoCapture functionality.
I only use this simple code:
import cv2
cap = cv2.VideoCapture()
cap.open("Field.avi")
print cap.isOpened()
I tried installing k-lite's most updated codec pack, and several more. Still, I get 'False'. Needless to say, the video is in the same folder as the py file.
The video works on the media player.
Thanks!
Are your path variables set correctly? If the python code isn't able to find the ffmpeg library which is in the provided library structure, then it will never execute correctly...
I've copied opencv_ffmpeg.dll to the Python27 folder. Is that what you mean?
I have no experience with python but when using the C++ interface on Windows, I have to define the location of all additional libraries and include folders. The PATH variable is used to define where the dll's for those libraries are found. I guess you need to do something equal in python?
The Python27 folder is written in PATH variable