3

I am using OpenCV 2.4.3 with my own 64-bit binaries that are also built with QT 4.8.3. I am using DirectShow for videocapture and recently encountered a problem that I am unable to solve. Namely, the following code works perfectly on uncompressed .avi files smaller than 2043 frames.

VideoCapture src = "D:/TestVideo/BigFile.avi";
Mat img;
while( src.read(img) )
{
 imshow("Input", img);
 waitKey(30);  
}

However, src.read(img) returns false on the 2043rd frame.

It does this on different Windows 7, 64-bit platforms and with all .avi files larger than 2043 frames. I doubt that it matters but the videos are 640x480, 8 bits, 1 and 3 channels.

Has anyone seen this problem before and can you recommend a solution?

Thanks, TR

Terry
  • 31
  • 3
  • 1
    Does it do this for all videos captured by DirectShow or for all videos in general? If it does it for all videos, I would suggest to try using any pre-built binaries either for 2.4.3 or for a previous version just to test if indeed this is the problem; fyi it runs fine for me: Windows 7, 64-bit, prebuilt 2.2, random large avi – Sassa Dec 20 '12 at 04:15
  • 1
    Thanks Bob. Your suggestion did not work for me, directly. It did, however, help isolate the issue. I tried the code in a simple console application, with pre-built and my own binaries, and it works fine. Duplicating the code in a simple Win32 test application also worked. Therefore, the problem seems related to the implementation within my larger Windows application. TR – Terry Dec 20 '12 at 16:58

0 Answers0