Top  Previous  Next

grabAVI ( string File, integer Frames [, integer Delay ])

Use this function to capture an AVI file from the video device selected in ImageWarp.

A string containing the name of the AVI file in which the captured video will be stored.  
A positive integer specifying the number of video frames to be captured into the AVI file.  
A positive integer specifying the delay (in milliseconds) between consecutive frames in the AVI file. The actual interval between the frames depends on the video device, video frame size, and AVI compression settings, and it can exceed the selected delay time. In this case or if the parameter is omitted, ImageWarp will use the least possible time between frames adjusting the frame rate for the AVI file accordingly.  
Error flags

The flag set if successful.  
The flag set if failed.  
The flag set if timeout occurred.  

The following operator will capture 1000 video frames into the "test.avi" file: The frame rate is set to 15 fps (66 ms per frame):  
grabAVI("c:\test.avi", 1000, 66)  

The compression method used for the AVI capture will depend on the codec selected in ImageWarp's Capture dialog. Some codecs support only certain image types and might not be compatible with the current settings of the video device. To find out information on the compatibility of a codec, contact the codec vendor.  
The capture can be interrupted by pressing the PAUSE/BREAK key at any time during the capture process. In this case, the recorded AVI file will contain the number of frames accumulated by the moment capturing was interrupted.