Ask Your Question

Revision history [back]

VideoCapture is not working with OpenCV 2.4.3

Hi everybody, Recently I migrated to OpenCV 2.4.3 from 2.4.1.

My program which worked well with 2.4.1 version now encounters problem with 2.4.3.

The problem is related to VideoCapture that can not open my video file.

I saw similar problem while searching the net but I couldn't find a proper solution for this. Here is my sample code:

VideoCapture video(argv[1]);
while(video.grab())
{
    video.retrieve(imgFrame);
    imshow("Video",ImgFrame);
    waitKey(1);
}

It's worth mentioning that capturing video from webcam device works well but I want to grab stream from file.

I'm using Qt creator 5 and I compiled OpenCV with MingW. I'm on Windows platform either.

I tried several different video formats and I rebuilt opencv with and without ffmpeg. But the problem is still consistent.

Any idea to solve the problem?

Thanks