View Full Version : Time error on avi compression.

Massimo Bettin
June 19, 2013, 18:36:46
Hi to all
I'm getting crazy with a strange problem.
I'm using VB6 and "Capture AVI video" example found on this web site with DFK 21BU04.
Everything seems to work well but at the end of capture, opening the video with WMP there is an evident time difference between the video time reported by WMP and the real video time.
To explain better: I started a video capture of a chronometer and in the same moment (more or less) I started the chronometer itself. During the capture I observed the live video windows and I checked it continuously with the chrono: the real time and the time showed by software window was the same.
After 5 minutes about I stopped the video capture and I opened the video with WMP. The time lenght of video was reportd as 4 minutes and half about and placing the cursor at 4:30 the image was relative to 5:00 minutes!!!
There is a kind of differente time base, I don't know...
I tried with several codecs, also uncompressed, but nothing do to: varying the codec it seems that the time difference change ... sigh!
Finally I tried to make the same experiment with official IC Capture application and EVERYTHING WORKS WELL!!.
I need to personalise the application, so I can't use IC Capture.
Can anyone help me with his experience ?

Stefan Geissler
June 20, 2013, 08:58:07
Hello Massimo,

first of all, the DV Encoder changes frame rate and resolution. Therefore, you will receive different results with his codec.

Regarding other codecs:
The MediaStreamSink of IC ImagingControl has a "FrameTimeCorrection" property. You can set it to false and see what happens.

I suppose, you encounter frame drops and therefore, the AVI file is shorter. Usually, the AVI capture will compensate this. But if a camera runs triggered, you will receive very long AVI files, if there are long pauses between the trigger pulses. The "FrameTimeCorrection" corrects this, so the AVI file runs over the time, you have image for only. In your case, this is contra productive, because the frame drops causes the playback time of your AVI file being shorter. Therefore, the "FrameTimeCorrection" should be set to false.

Please refer to

Massimo Bettin
June 24, 2013, 19:26:08
Hi Stefan
thank you for your reply.

I made in the meantime several tests to understand better. I can definitively agree with you that the problem are the dropped frames. This makes the video playback shorter and quicker then real.
I tried to acquire some videos without touching anything and in the opposite way, trying to make all possible operations like open windows, web pages, launch scandisk an so on. More operations, more dropped frames.
It seems that the graphical operations generates more dropped frames instead of disk operations.

In any case I tried to make these steps:
- first of all, I compiled my application and executed as .exe, instead of to run in the VB6 GUI
- I installed the Processor Idle Manager
- I disabled the live preview of my application during the acquisition
- I increased RAM of my PC

Now I'm running my video application with just another application which must run in my small project and with AVG antivirus software active in background. Dropped frames are 1-3 at maximum in more that 4000 frames acquired which is the tipical duration of my video application.
I tried to set the property .FrameCorrection to False and also to True but it seems that this doesn't have any influence.

I'm convinced that if I install a new hard disk dedicated to video acquisition and I disable AVG, I will obtain 0 dropped frames (more or less).

Thank you so much for your help.

Massimo Bettin