StartVideoCapture (DVR version only)
Top  Previous  Next


Starts time-lapse video capture to the AVI file created by CreateVideo. Use StopVideoCapture to end video capture.


objActiveGige.StartVideoCapture [Frames = 0 [, Timelapse = 0, Playrate = 0 ]

HRESULT StartVideoCapture( long Frames, float Timelapse, float Playrate );

Data Types [VB]

Frames : Long
Timelapse : Single (optional)
Playrate : Single (optional)


Frames [in]  
The number of frames to capture. The video capture will stop automatically after the specified number of frames is reached or StopVideoCapture is called. If zero or omitted, the video capture will continue until the disk is full or or StopVideoCapture is called.  
Timelapse [in]  
The interval between consecutive frames in seconds. If zero or omitted, the video will be recorded at the maximum frame rate define by the camera settings and system throughput.  
Playrate [in]  
The frame rate at which AVT file will be played in frames per second. If zero or omitted, the video will be played back at the same rate it was captured.  

Return Values



This VB example demonstrates how to create an AVI file and capture 1000 frames into it.

Private Sub

ActiveGige1.CreateVideo "c:\\mycapture.avi"
ActiveGige1.Acquire = True

End Sub

Private Sub
ActiveGige1.StartVideoCapture 1000

End Sub


The advantage of using this method as opposed to StartCapture is that StartVideoCapture is called after an AVI file is already opened and preallocated with CreateVideo. As a result, the video capture starts immediately with no delay.

The Acquire property must be set to TRUE prior to calling this method.

To record compressed AVI files, use ShowCompressionDlg, SetCodec and ShowCodecDlg. If no codec has been selected, ActiveGige will record AVI files in the uncompressed format, 8- or 24-bits per pixel.

If the external device (typically, a hard drive or memory card) does not have enough space, the capture will stop automatically when the device is full and the CaptureCompleted event will be fired.