Class LiveVideoCompositorSettings
- Namespace
- VisioForge.Core.LiveVideoCompositor
- Assembly
- VisioForge.Core.dll
Configuration settings for the Live Video Compositor, defining video/audio format parameters, mixer technology, resource limits, and processing capabilities for real-time composition. These settings determine the compositor's output quality, performance characteristics, and capacity for handling multiple inputs and outputs.
public class LiveVideoCompositorSettingsInheritance
Inherited Members
Examples
// Create settings for 1080p live composition
var settings = new LiveVideoCompositorSettings(1920, 1080, new VideoFrameRate(30, 1))
{
MixerType = LVCMixerType.OpenGL,
VideoChannelCount = 2, // Two independent video processing channels
MaxVideoInputsCount = 6,
MaxVideoOutputsCount = 3,
AudioSampleRate = 48000,
AudioChannels = 2
};
Remarks
The settings are immutable for video dimensions and frame rate once created, as these fundamental parameters affect the entire composition pipeline. Other settings like mixer type and capacity limits can be adjusted based on the target platform and performance requirements. Default values are optimized for common live streaming scenarios with balanced quality and performance.
Constructors
LiveVideoCompositorSettings(int, int, VideoFrameRate)
Initializes a new instance of the VisioForge.Core.LiveVideoCompositor.LiveVideoCompositorSettings class with specified video dimensions and frame rate.
public LiveVideoCompositorSettings(int width, int height, VideoFrameRate frameRate)Parameters
widthint-
The width of the video composition in pixels. Must be greater than 0.
heightint-
The height of the video composition in pixels. Must be greater than 0.
frameRateVideoFrameRate-
The frame rate of the composition as a rational number (e.g., new VideoFrameRate(30, 1) for 30fps).
Remarks
The video dimensions and frame rate are immutable once set. The mixer type is automatically selected based on the platform: D3D11 for Windows, OpenGL for other platforms.
Properties
AudioChannels
Gets or sets the number of audio channels for the composition.
public int AudioChannels { get; set; }Property Value
Remarks
Common configurations:
- 1: Mono
- 2: Stereo (L/R)
- 6: 5.1 surround
- 8: 7.1 surround Audio inputs will be upmixed/downmixed to match this configuration.
AudioFormat
Gets or sets the audio sample format for the composition.
public AudioFormatX AudioFormat { get; set; }Property Value
Remarks
Supported formats include:
- S16LE: 16-bit signed PCM, most compatible
- S32LE: 32-bit signed PCM, higher quality
- F32LE: 32-bit float, professional quality
AudioSampleRate
Gets or sets the audio sample rate in Hz for the composition.
public int AudioSampleRate { get; set; }Property Value
Remarks
Common sample rates include:
- 44100: CD quality
- 48000: Professional audio/video standard
- 96000: High-resolution audio All audio inputs will be resampled to match this rate if different.
MaxAudioInputsCount
Gets or sets the maximum number of audio input sources that can be connected to the compositor.
public int MaxAudioInputsCount { get; set; }Property Value
Remarks
Audio inputs can include microphones, system audio, file sources, or network streams. Each input can be independently mixed with volume, panning, and effects control.
MaxAudioOutputsCount
Gets or sets the maximum number of audio output destinations that can receive the mixed audio.
public int MaxAudioOutputsCount { get; set; }Property Value
Remarks
Multiple audio outputs enable scenarios like separate mix-minus feeds, multi-language outputs, or different audio processing chains.
MaxVideoInputsCount
Gets or sets the maximum number of video input sources that can be connected to the compositor.
public int MaxVideoInputsCount { get; set; }Property Value
Remarks
This value should be set based on expected usage and available system resources. Higher values allow more simultaneous video sources but require more memory and processing power. Typical use cases: 2-4 for basic mixing, 8-16 for complex productions.
MaxVideoOutputsCount
Gets or sets the maximum number of video output destinations that can receive the composed video.
public int MaxVideoOutputsCount { get; set; }Property Value
Remarks
Multiple outputs allow simultaneous streaming, recording, and preview. Common configurations: 1 for simple recording, 2-3 for streaming + recording, 4+ for multi-destination broadcasting.
MixerType
Gets or sets the type of the video mixer technology used for compositing multiple video streams.
public LVCMixerType MixerType { get; set; }Property Value
Remarks
Different mixer types offer varying performance characteristics:
- D3D11: Best performance on Windows with DirectX 11 support
- OpenGL: Cross-platform compatibility with good performance
- Software: CPU-based mixing, most compatible but slowest
RandomKey
Gets the unique random key assigned to this compositor instance.
public int RandomKey { get; }Property Value
Remarks
This key is automatically generated at creation and ensures unique identification of bridge connections between the main compositor and its inputs/outputs.
VideoChannelCount
Gets or sets the number of independent video processing channels in the compositor.
public uint VideoChannelCount { get; set; }Property Value
Remarks
Multiple channels allow for independent video processing pipelines within the same compositor, useful for multi-view outputs or separate processing chains. Each channel can have its own set of inputs, effects, and outputs.
VideoFrameRate
Gets the video frame rate for the composition.
public VideoFrameRate VideoFrameRate { get; }Property Value
Remarks
Common frame rates include 24, 25, 29.97, 30, 50, 59.94, and 60 fps. All inputs will be resampled to match this frame rate if different.
VideoHeight
Gets the height of the video composition in pixels.
public int VideoHeight { get; }Property Value
Remarks
Common values include 1080 (Full HD), 720 (HD), 2160 (4K UHD). All inputs will be scaled/positioned within this resolution.
VideoWidth
Gets the width of the video composition in pixels.
public int VideoWidth { get; }Property Value
Remarks
Common values include 1920 (Full HD), 1280 (HD), 3840 (4K UHD). All inputs will be scaled/positioned within this resolution.