Ask Your Question

Revision history [back]

VideoCapture(filename) error (OpenCV 2.4.2) - Windows 7


Please excuse me if there are missing information. I will try to describe the problem with the most detail possible.

After integrating OpenCV 2.4.2 within Qt 5.1.1 (MSVC 2010, 32 bit), I am trying to use VideoCapture with an avi file but I get this error when the Qt program runs:

warning: Error opening file (../../modules/highgui/src/cap_ffmpeg_impl.hpp:361)

I used that same program in Qt to a webcam, which is by replacing filename with 0 and it worked. As I have understood from reading all the blogs, this is a problem with opencv_ffmpeg. When I built the openCV (using MSVC 2010), I don't recall adding FFmpeg anywhere, however, in the folder C:\OpenCV\2.4.2\3rdparty\ffmpeg, I already have a dll under the name of opencv_ffmpeg.dll. I added that path to my project in Qt and I still could not resolve the issue.

Please let me know if there is more info that is needed.

Thanks very much in advance. Ibra