Skip to content

Raw capture of audio and video samples

The raw samples coming out of the current video capture device and/or audio capture device can be captured.

Enabling the raw sample capture

  • For the video samples, enable RawVideoSampleCapture. Then, during preview or recording, each video sample coming out of the current video capture device is returned by the OnRawVideoSample event.
  • For the audio samples, enable RawAudioSampleCapture. Then, during preview or recording, each audio sample coming out of the current audio capture device is returned by the OnRawAudioSample event.

The OnRawVideoSample and OnRawAudioSample events return the TOnRawVideoSample and TOnRawAudioSample data (pointer to the sample data, buffer size, etc.).

Location of the raw sample capture

The location of the raw sample capture depends on the RawSampleCaptureLocation property:

  • rl_SourceFormat: the sample capture is inserted on the capture device output,
  • rl_AfterCompression: the sample capture is inserted after the audio or video compressor, when recording and compressing on the fly.