OpenCV videocapture for large files

1.3k Views Asked by At

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

0

There are 0 best solutions below