Windows OpenCV VideoCapture Will Not Open Video File

asked 2013-02-06 19:20:11 -0600

Daedalus gravatar image

My team and I are working on a project with OpenCV (v. 2.4.2) and QT(v. 4.8.4). We are developing in QtCreator. It is a cross-platform project that will be primarily looking for movement in video files.

On the Mac OSX, the video file will open properly using the normal cv::VideoCapture object and interface and we can run our program successfully. However, on Windows 7 (32 bit versions of the libraries), the file would not open, just throwing this error on the QtCreator terminal when the program exits:

warning: Error opening file (../../modules/highgui/src/cap_ffmpeg_impl.hpp:361) However, when we set QtCreator to 'Release' build mode instead of 'Debug', the program opens the file as it should.

My teammate and I have done extensive research on this error and found no real solutions. We have tried installing codecs, moving the opencv_ffmpeg.dll file to the working directory of the .exe, and modifying the path with the location of the opencv_ffmpeg.dll (as well as the location of the ffmpeg library.) We have also made sure that our video is valid, as well as the file path (the same video works on a MacOS, and the video file will actually play in Windows through Qt's Phonon module).

Any ideas about what could be causing this issue?

edit retag flag offensive close merge delete

Comments

i have the same problem on windows 7 and i can not find a solution

openprog gravatar imageopenprog ( 2014-11-05 03:57:14 -0600 )edit