Table of Contents

Enum PIPMode

Namespace
VisioForge.Core.Types.VideoCapture
Assembly
VisioForge.Core.dll

Defines the layout modes for Picture-In-Picture (PIP) video composition.

public enum PIPMode

Fields

Custom = 0

Custom manual layout mode where positions and sizes are defined programmatically.

In custom mode, you have complete control over the output frame size and the position, size, and z-order of each video source. This mode is ideal when you need:

  • Non-standard layouts or asymmetric compositions
  • Precise positioning of video sources
  • Complex multi-source arrangements
  • Animated or dynamic repositioning during capture

You must specify the output resolution and provide coordinates and dimensions for each source using the appropriate PIP configuration properties.

Horizontal = 1

Horizontal side-by-side layout with sources arranged from left to right.

Places video sources horizontally adjacent to each other, each occupying an equal portion of the output width. For example, with two sources, each takes 50% of the width. All sources maintain their aspect ratio by default.

Best for:

  • Split-screen interviews or conversations
  • Before/after comparisons
  • Multiple camera angles of the same scene
  • Comparison videos
Vertical = 2

Vertical top-to-bottom layout with sources stacked vertically.

Places video sources vertically one above the other, each occupying an equal portion of the output height. Sources maintain their aspect ratio by default.

Best for:

  • Vertical video formats (mobile/social media)
  • Timeline-style multi-camera views
  • Storyboard presentations
Mode2x2 = 3

2x2 grid layout with four equally-sized quadrants.

Divides the output frame into four equal quadrants arranged in a 2x2 grid. This is the classic quad-split view commonly used in surveillance and video conferencing.

Quadrants are typically filled in this order:

  1. Top-left
  2. Top-right
  3. Bottom-left
  4. Bottom-right

Best for:

  • Security camera displays (quad view)
  • Four-person video conferences
  • Multi-angle sports/event coverage
  • Panel discussions
MultipleVideoStreams = 4

Multiple video streams mode for capture into separate streams within one file.

This is not a traditional PIP compositing mode. Instead, it captures multiple video sources as separate streams within a single container file. Each video source maintains its independent timeline and can be accessed individually during playback.

Important: Currently only WMV output format is supported for this mode, using a special external profile provided with the SDK. The profile must be configured to contain the correct number of video streams matching your sources.

Best for:

  • Multi-camera synchronized recording with post-production flexibility
  • Recording multiple angles for later editing
  • Professional video production workflows

Note: You can modify the provided WMV profile or create custom profiles if you need different stream configurations. The profile structure must match the number of sources.

ChromaKey = 5

Chroma key (green/blue screen) compositing mode with background and foreground sources.

Enables chroma keying where one source acts as the background and another source (recorded against a chroma key screen) is composited over it. The chroma key color (typically green or blue) is made transparent, allowing the background to show through.

Configuration requires:

  • Main source: The background video/image
  • Second source: The foreground video with chroma key background
  • Chroma key settings: Color and tolerance values (see VisioForge.Core.Types.VideoCapture.PIPChromaKeySettings)

Best for:

  • Virtual backgrounds in video conferencing
  • Weather forecasting presentations
  • Virtual studio production
  • Creative video effects and compositing

Tip: For best chroma key results, ensure even lighting on the green/blue screen, select the exact background color using the chroma key settings, and adjust tolerance values to balance between removing the background and preserving foreground details.

Remarks

PIP mode determines how multiple video sources are arranged and composited into a single output stream. Each mode provides a different layout pattern suitable for various use cases such as video conferencing, multi-camera production, or creative video effects.

The framework automatically handles video scaling, positioning, and rendering based on the selected mode and the configured output resolution. Custom mode allows complete control over source positioning and sizing.