OpenCV 2.4 VideoCapture not working on Windows OpenCV 2.4 VideoCapture not working on Windows windows windows

OpenCV 2.4 VideoCapture not working on Windows


Add C:\OpenCV\3rdparty\ffmpeg\ to the Windows PATH environment variable or copy opencv_ffmpeg.dll from that directory to C:\Python27\ or to a directory that is in the PATH. Alternatively, use the OpenCV binaries from http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv.

Renaming the opencv_ffmpeg.dll file may also be necessary.

For OpenCV version X.Y.Z
opencv_ffmpeg.dll ==> opencv_ffmpegXYZ.dll

For 64-bit OpenCV version X.Y.Z
opencv_ffmpeg.dll ==> opencv_ffmpegXYZ_64.dll


Copying opencv_ffmpeg.dll wasn't enough for me - I had to rename it to opencv_ffmpeg246.dll, when I used OpenCV 2.4.6 with Python 2.7.5


I first tried copying, then changing the Path environment of windows.. it didn't work until i changed the name to opencv_ffmpeg245.dll for my openCV version 2.4.5 and python 2.7. (notice **245.dll is from opencv version 2.4.5)