WindowsConnect VideoCapture won't open video file

My team and I are working on a project with OpenCV (v. 2.4.2) and QT (v. 4.8.4). We are developing at QtCreator. This is a cross-platform project that will mainly search for motion in video files.

On Mac OSX, the video file will open correctly using the regular object and cv :: VideoCapture interface, and we can successfully run our program. However, on Windows, the file won't open, just throwing this error to 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" instead of "Debug", the program opens the file properly.

My teammate and I have done extensive research on this error and have found no real solutions. We tried to install the codecs by moving the opencv_ffmpeg.dll file to the .exe working directory and changing the path with the location of the opencv_ffmpeg.dll file (as well as the location of the ffmpeg library.) We also made sure that our video is valid, as well as the file path (the same the video runs on macOS and the video file will play on Windows via the Qt Phonon module).

Similar questions:

VideoCapture OpenCV 2.4.2 error on Windows

VideoCapture problem in OpenCV 2.3

Any ideas on what might be causing this problem?

+3


source to share


1 answer


Unfortunately, I cannot explain the reason, but we also often encounter these problems if we use pre-compiled OpenCV DLLs. The error is thrown anywhere by connecting ffmpeg to video capture. In our case, fixing the OpenCV error on the respective computer fixed the error.



+1


source







All Articles