Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Correct video properties are hard to assess - this is why OpenCV is struggling to offer a solid VideoCapture (CvCapture) object, but until now, it still have some inconsistencies.

What you can do is to install more codecs on your machine, or convert the avi file with a codec that works better on your installation (this is a trial and error process).

Many others have similar problems, and here are some tips from them:

OpenCV captures only a fraction of the frames from a video file

Creating Video from Images with OpenCV 2.4.1 on Ubuntu

Correct video properties are hard to assess - this is why OpenCV is struggling to offer a solid VideoCapture (CvCapture) object, but until now, it still have some inconsistencies.

What you can do is to install more codecs on your machine, or convert the avi file with a codec that works better on your installation (this is a trial and error process).

Another tip is to rely on parameters that measure the video properties in msecs, and not the COUNT, and FRAME_POS, because those are more buggy

Many others have similar problems, and here are some tips from them:

OpenCV captures only a fraction of the frames from a video file

Creating Video from Images with OpenCV 2.4.1 on Ubuntu