I just wrote a simple video reading example with openCV2.3.1, but it seems that I cannot open avi video anyway :(
Vid
In OpenCV 2.4.4 : there is only opencv_ffmpeg244.dll (release dll) and not opencv_ffmpeg244d.dll (debug dll)
So try in release compilation mode !
A missing OpenCV's ffmpeg.dll does not generate any warnings/errors in OpenCV 2.3.1, and code fails silently. Make sure that you have proper opencv_ffmpeg*.dll in your path.
If you are using Ubuntu 16+, you can try this:
pip install opencv-python
Under Windows x64, you don't have to rename anything. Just put the following ...\opencv\build\x64\vc12\bin in your PATH.
I also encounter the same problem. With the sample code for VideoCapture, my visual studio program failed to open any video file. Then, the suggestion of nimcap works for me. "A missing OpenCV's ffmpeg.dll does not generate any warnings/errors in OpenCV 2.3.1, and code fails silently. Make sure that you have proper opencv_ffmpeg*.dll in your path."
Solution: Copy opencv_ffmpeg.dll to my visual studio project /Debug
folder, I can open almost any video file with VideoCapture.