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
と
With OpenCV 2.4.10, adding C:\opencv\sources\3rdparty\ffmpeg to Windows path and renaming opencv_ffmpeg.dll and opencv_ffmpeg_64.dll to opencv_ffmpeg2410.dll and opencv_ffmpeg2410_64.dll it works ! Thanks 🙂 I am now able to open MJPEG video files – VincentFeb 18 ’15 at 7:59
Thanks – this works! It’s frustrating that this “silently fails” without that DLL copied in. I’d rather instead of a subtle false, a nice big exception “error, Danger Will Robinson, missing dll <…>” and then die. – Danny StapleDec 13 ’15 at 21:26