Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9306953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T00:17:13+00:00 2026-06-19T00:17:13+00:00

I have a problem using VideoCapture class with OpenCV 2.4.2 under windows XP 32bits.

  • 0

I have a problem using VideoCapture class with OpenCV 2.4.2 under windows XP 32bits.
It doesn’t open any file or camera and fixing it’s being a pain.
Im using visual studio 2010 but i have also tried the code in QTcreator with the same result.

The testing code is the following:

#include "opencv/cv.h"
#include "opencv/highgui.h"
#include <iostream>
#include <string> 
#include <iomanip> 
#include <sstream> 

using namespace cv;
using namespace std;

int main()
{
    const char* videoPath = "C:/video/";
    string videoName = string(videoPath) + "avi.avi";
    VideoCapture cap(videoName);

    if(!cap.isOpened()) 
    {
        std::cout<<"Fail"<<std::endl;
        return -3;
    }
    return 0; 
}

The output is always ‘-3’.
Qt Creator shows a
warning: Error opening file (../../modules/highgui/src/cap_ffmpeg_impl.hpp:361)

I debugged it and the problem appears in the first line of:

CvCapture* cvCreateFileCapture_FFMPEG_proxy(const char * filename)
{
    CvCapture_FFMPEG_proxy* result = new CvCapture_FFMPEG_proxy;
    if( result->open( filename ))
        return result;
    delete result;
#if defined WIN32 || defined _WIN32
    return cvCreateFileCapture_VFW(filename);
#else
    return 0;
#endif
}

in the cap_ffmpeg.cpp internal file.

I have tested the same code in a mac under snow leopard and it works. No surprises here since it must be a library issue.
I have opened the avi file with the same path route using the c-function cvCapture easy and fast.
I got all the dlls of ‘C:\opencv\opencv\build\x86\vc10\bin’
included in mi debug file. I got the tbb.dll and all the ‘C:\opencv\opencv\3rdparty\ffmpeg’ content included too.

This is drving me crazy so any help would be appreciated.

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-19T00:17:14+00:00Added an answer on June 19, 2026 at 12:17 am

    In my case, the same problem was resolved after deleting all opencv_***.dll files in C:\Windows\System32. So, I use the dll files just through the path like "%PATH%;C: \Program Files \OpenCV2.4.2\build\x86\vc10/bin". Please try it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a problem using VideoWriter opencv class with JNI in android. My aim
I have a problem using an array within a foreach within a class. I
i have problem using camera in my Android application i have a form for
I have problem with using class instance in Python. Ive created a new class
I have problem in using ExceptionMatcher...My example spec: class DescribeBall extends \PHPSpec\Context { private
I have problem using jstl tag <c:if> in jsp file. Basically I should make
I have a problem using openCV 2.3.1 installed from mac ports. For installation and
I have problem using arabic font for iOS. All fonts have the same render,
i have problem using LIKE structure in DB2 : for example: select * from
I have problem while using jquery maskedinput with asp.net textbox. I have a check

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.