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

asked 2013-11-21 18:20:15 -0500

Hi,

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

edit retag flag offensive close merge delete

Comments

1

I was able to determine that the program works in Release mode but not in Debug mode. I don't know if this is a problem with a missing dll (namely ffmpeg_opencv) for Debug mode. Any ideas?

Thanks a lot!

ibraspot gravatar imageibraspot ( 2013-11-22 11:09:52 -0500 )edit
1

Problem solved! Thanks for all! - .pro file needed modification to link to the debug .lib files. Hope that helps people in the future.

ibraspot gravatar imageibraspot ( 2013-11-22 11:47:56 -0500 )edit

Hey ... I am facing the same problem....Would you please elaborate on the steps you followed to get it solved? Thank You

So111sen gravatar imageSo111sen ( 2014-10-05 10:13:48 -0500 )edit

i have the same problem on windows how can i solve it?

openprog gravatar imageopenprog ( 2014-11-05 04:10:51 -0500 )edit