3

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, 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).

Similar questions:

VideoCapture OpenCV 2.4.2 error in windows

Problem with VideoCapture in OpenCV 2.3

Any ideas about what could be causing this issue?

1
  • By the way we are using Windows 7 with the 32 bit versions of the libraries.
    – Daedalus
    Feb 7, 2013 at 1:11

1 Answer 1

1

Unfortunately, I can't give the reason but we also often get these problems if we use precompiled OpenCV dll's. The error is caused anywhere by connecting ffmpeg to the videocapture. In our case rebuilding OpenCV on the concerned computer fixed the error.

3
  • Yeah that makes sense, we are using the precompiled dll's as well. When we recompile from the source, do we have to compile with/include ffmpeg in a special way or is that done automatically in OpenCV 2.4?
    – Daedalus
    Feb 12, 2013 at 23:25
  • I every time use the default settings. Somehow than the codecs are connected correctly, but I do not know how excatly, perhaps opencv parse some system specific folders or settings. Feb 23, 2013 at 8:19
  • I hope this is wrong (since I cannot get OpenCV to build locally) but it could be at the root of my problems too: stackoverflow.com/q/19598664/575530
    – dumbledad
    Oct 26, 2013 at 16:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.