I’ve been using OpenCV for quite some time now and I always ignored more or less an oddity that occurs while writing AVIs with OpenCV commands. But now I need it for another purpose and it has to be accurate.
When I read a XVID compressed AVI with cvCaptureFromFile (or FromAVI) and then write the frames with cvVideoWriter (choosing XVID compression from the W32 menu) the resulting AVI always lacks the last frame of the original vid. That frame is also ignored while reading unless the input vid is an uncompressed AVI but in that case when I choose uncompressed (or a codec) for saving the last frame makes trouble and the program aborts leaving no readable AVI file.
What can I do about it, anyone know?
Cheers
Stephan
1) Upgrade to the newest OpenCV available and try again.
2) If that doesn’t work, you’ll have to choose another multimedia framework to read the frames: ffmpeg or gstreamer.
That’s all I can think right now.