Skip to content

Hardware compression

Some video capture devices, e.g. the Dazzle Video Creator, offer hardware compression in various formats. When it is available for the video capture device, TVideoGrabber handles it in 2 ways, depending on the device.

1st case

The device exposes its hardware-encoded formats through the VideoSubtypes list (they appear e.g. as "divx" or "MPEG2").

In this case:

  1. Set VideoSubtype to the index of the desired format in the VideoSubtypes list.
  2. Keep the RecordingInNativeFormat property enabled, to prevent the decompression of the hardware-encoded video stream (e.g. if the FrameGrabber is enabled).
  3. Keep CompressionMode = cm_NoCompression, because the compression is selected through the VideoSubtype index.
  4. Invoke StartRecording.

2nd case

The device exposes its hardware encoder through the VideoCompressors list, and it does not appear in the VideoSubtypes list.

In this case:

  1. Do not change the default value of the VideoSubtype index.
  2. Assign to VideoCompressor the index of the hardware encoder in the VideoCompressors list.
  3. Set CompressionMode = cm_CompressOnTheFly to perform the hardware compression during recording.
  4. Invoke StartRecording.