Table of Contents

Class DirectCaptureAVIOutput

Namespace
VisioForge.Core.Types.Output
Assembly
VisioForge.Core.dll

Represents configuration settings for DirectCapture AVI output with optional MP3 audio encoding.

public sealed class DirectCaptureAVIOutput : IVideoCaptureBaseOutput

Inheritance

Implements

Inherited Members

Remarks

DirectCapture is a specialized capture mode that creates a more direct connection between the capture source and the file writer, bypassing unnecessary DirectShow filters for improved performance. This class configures output to AVI format using DirectCapture mode.

DirectCapture AVI provides:

  • Lower latency capture compared to standard AVI output
  • Reduced CPU usage by eliminating unnecessary processing steps
  • More reliable capture at high data rates
  • Direct source-to-disk recording path

Key differences from standard AVI output:

  • Fewer intermediate filters in the capture graph
  • May have limited support for video effects and filters
  • Preview functionality may be restricted
  • Not all capture devices support DirectCapture mode

This output format supports optional MP3 audio encoding through the LAME encoder, allowing for compressed audio tracks within the AVI container. When MP3 is not used, audio is typically stored as uncompressed PCM.

Use DirectCapture AVI when:

  • Recording high-resolution or high-framerate video
  • Minimal processing latency is required
  • System resources are limited
  • Simple, efficient capture is more important than effects

Properties

MP3

Gets or sets the MP3 audio encoding settings for the AVI output.

public MP3Output MP3 { get; set; }

Property Value

MP3Output

Remarks

When this property is set, audio will be compressed using the LAME MP3 encoder with the specified settings. This allows for smaller file sizes while maintaining reasonable audio quality. When null, audio is stored as uncompressed PCM, resulting in larger files but perfect quality.

MP3 compression is particularly useful for:

  • Long recordings where file size is a concern
  • Web delivery or streaming applications
  • Archival storage with space constraints

Methods

GetInternalTypeVC()

Gets the internal output format identifier for video capture operations.

public VideoCaptureOutputFormat GetInternalTypeVC()

Returns

VideoCaptureOutputFormat

Returns VisioForge.Core.Types.VideoCapture.VideoCaptureOutputFormat.DirectCaptureAVI to indicate this is a DirectCapture AVI output format.

Remarks

This method is used internally by the video capture system to identify the output format type. It implements the VisioForge.Core.Types.Output.IVideoCaptureBaseOutput.GetInternalTypeVC interface method.

Load(string)

Deserializes DirectCapture AVI output settings from a JSON string.

public static DirectCaptureAVIOutput Load(string json)

Parameters

json string

The JSON string containing the serialized DirectCapture AVI output settings.

Returns

DirectCaptureAVIOutput

A new VisioForge.Core.Types.Output.DirectCaptureAVIOutput instance with settings restored from the JSON string.

Remarks

This method uses the default JSON deserialization options from VisioForge.Core.Helpers.JsonSerializerOptionsHelper. The JSON string should have been created using the VisioForge.Core.Types.Output.DirectCaptureAVIOutput.Save method or follow the same format. All properties including the MP3 settings (if present) will be restored.

Exceptions

JsonException

Thrown when the JSON string is invalid or cannot be deserialized to a DirectCaptureAVIOutput object.

Save()

Serializes the current DirectCapture AVI output settings to a JSON string.

public string Save()

Returns

string

A JSON string representation of the current settings that can be persisted or transmitted.

Remarks

This method uses the default JSON serialization options from VisioForge.Core.Helpers.JsonSerializerOptionsHelper. The resulting JSON includes the MP3 encoding settings (if configured). The serialized settings can be restored later using the VisioForge.Core.Types.Output.DirectCaptureAVIOutput.Load(System.String) method.