I'm using Python bindings to OpenCV 2.4 installed with following instructions.
My problem is similar to this one, but I need Windows machine solution.
Problem: when I try to use
cap = cv2.VideoCapture(0)
print cap.grab()
it works fine, but the following code
cap = cv2.VideoCapture(filename)
print cap.grab()
always return False.
Path to the file is correct, absolute and has no spaces.
I tried on two machines with Windows XP and Windows 7 with similar results. On Linux (Ubuntu) it works fine for me.
filename = os.path.join( filename ). more info here: stackoverflow.com/questions/1633643/… – Larry Battle Jul 28 '12 at 8:03"C:\\m.avi", but I just tried"C:\m.avi"and"C:/m.avi". It still not working (with and withoutos.path.join). – Bihaqo Jul 28 '12 at 8:29opencv_ffmpeg.dlltoC:\Python27\Lib\site-packages` (likecv2.pyd`) but it doesn't work. – Bihaqo Jul 30 '12 at 11:10