Skip to content

Video format

OVERVIEW The frame grabber allows to capture frames as well as to draw or write text over video frames.

The frame grabber requires RGB source on its input pin. So, if the current video subtype of the video source is compressed (e.g. YUY2), it will be uncompressed into RGB format. Therefore, enabling the frame grabber modifies the video subtype, unless RecordingInNativeFormat is enabled, that means "record the video stream "as is" without modifying it".

During recording, there are 2 possibilities: - either the frame grabber is used on the AVI stream (case A below), so drawing over video frames will affect the AVI file, but the AVI video stream will be RGB, whatever the video subtype (except for native DV), - either the frame grabber is NOT used on the AVI stream (case B below), and the video subtype is preserved in the AVI file (not converted to RGB). In this case drawing over video frames will affect only the preview, not the video frames saved to the AVI stream.

A. AVI FORMAT WHEN THE FRAME GRABBER IS USED ON THE AVI STREAM (FrameGrabber = fg_CaptureStream or fg_BothStreams)

The video stream is saved as 'vids', fourCC = RGB32, RGB24, RGB565, RGB555, or RGB8 depeding on the FrameGrabberRGBFormat setting. B. AVI FORMAT WHEN THE FRAME GRABBER IS NOT USED ON THE AVI STREAM (FrameGrabber = fg_PreviewStream or fg_Disabled) (*) DIB format (Device Independent Bitmap) will be RGB8, RGB555, RGB565, RGB24 or RGB32 according to the current display colour bit count. Note: any listbox that shows the video subtypes of the current video capture device should be refreshed with VideoSubtypes (VideoSubtype is the current index in this list) when the OnVideoDeviceSelected event occurs.

Look at the MainDemo project for sample code.