PDA

View Full Version : Dealy for AVI stream



gbugnard
October 11, 2007, 21:19:33
Hi

Is it possible to get the time delay between the start of a streaming with the method "AviStartCapture" and the real beginning of the capture?

I am using a DFG/1394-1e with LabView and obviously, there is a time shift of about 80 to 200 ms between the start of the capture in LabView and the real capture start.

To control the sync, the camera films a portion of LabView's front panel with a digital display of the actual time in LabView. The image in the movie always starts between 80 or 200 ms (the sample frequency is 25 Hz). After the test, I extract every frame out of the AVI with QuickTime Pro and name the image file with the frame number. With this method, one can compute the theoretical time of the frame:

Time = (i-1) * 40ms/frames + offset

with i the frame number. With this formula, the theoritical time always corresponds to the time on the image for all the tests I ran. The only problem I have, the offset is always different. Is it possible to compute it directly during the experiment?

As example the frame 1 and 167 of one of the test. The first frame starts at 121ms. The theorital time for the frame 167 is then: (167-1)*40ms + 121ms = 6761ms which is quite the same as on the picture.

Thanks!

Stefan Geissler
October 12, 2007, 11:32:02
Hi,

I am very sorry, but there is no method to query the delay. But you can avoid the delay be setting the property "LiveCapturePause" to true before calling "AviCaptureStart". After you have called AVICaptureStart, the device and files are prepared, but the AVI capture is not started. Immediately after you have set LiveCapturePause to false, the AVI capture starts. This minimizes the delay.

Please refer to
http://www.imagingcontrol.com/support/documentation/activex/prop_descICImagingControl_LiveCapturePause.htm

gbugnard
October 15, 2007, 07:02:29
Thanks for your answer.

I already had the property "LiveCapturePause", but after right the "AviCaptureStart". By placing the pause before the start I only have the first frame which is delayed. If I remove it, it seems to be ok. Thanks for the help.