PlayVideo (DVR version only)
Top  Previous  Next


Plays back the currently open video file (AVI or TIF) or memory sequence in the ActiveGige window.


objActiveGige.PlayVideo [ Start, End, Increment ]

HRESULT PlayVideo( long Start, long End, long Increment );

Data Types

Start: Long
End: Long
Increment: Long


Start [in]  
The zero-based index of the frame of the video file or sequence at which the playback will start. If omitted, the whole file or sequence will be played forward. If -1, the whole file or sequence will be played backward.  
End [in]  
The zero-based index of the frame at which the playback will stop. If omitted, the playback will stop at the last frame. If End < Start, the specified fragment will be played backward.  
Increment [in]  
The increment of frames during the playback. If 2, every second frame will be played. If 3, every third frame will be played, and so on. If 0, 1 or ommitted, the playback of every frame will occur.  

Return Values



This VB example opens an AVI file and plays its fragment while updating the frame count.

Private Sub
ActiveGige1.OpenVideo "C:\\video1.avi"
ActiveGige1.PlayVideo 0, 50
End Sub

As Integer

Private Sub
frameplayed = frameplayed + 1
LabelCount.Caption = frameplayed
End Sub

Private Sub
ActiveGige1_PlayCompleted (ByVal Frames As Long)

End Sub


The video will be played at the frame rate at which it was recorded unless the SetVideoFPS method is applied.

If the video file was recorded with compression, a corresponding codec must be installed on the system in order to play it back. Note that the playback frame rate of a compressed video file can become significantly reduced if the video is played backward or the Increment parameter used.

Per each frame of the video file or sequence played, the FrameLoaded event will be fired. When the playback is finished, the PlayCompleted event will be fired.

During the playback frames are being extracted from the video file or memory sequence and loaded into the internal ActiveGige buffer. The pixels of the currently loaded frame can be accessed via ActiveGige image access functions (GetImageData, GetImagePointer, GetImageWindow etc).

During the playback of a memory sequence all current conversion properties (such as Bayer, WindowLevel, BkgCorrect, Rotate) will be applied to the frames of the sequence in real time.

Calling this method will automatically turn off the live video by setting the Acquire property to FALSE.