media-blocks-sdk-net-wpf

Build graph-based media pipelines for capture, transcode, and recording in WPF.

Updated May 29, 2025
One-click install
npx skills add https://github.com/visioforge/help --skill media-blocks-sdk-net-wpf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: media-blocks-sdk-net-wpf
Source: https://github.com/visioforge/help/tree/main/dotnet/agent-skills/media-blocks-sdk-net-wpf
Command: npx skills add https://github.com/visioforge/help --skill media-blocks-sdk-net-wpf

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Integrating VisioForge Media Blocks SDK into a Windows WPF app is difficult because you must correctly assemble and wire a graph of media blocks (sources, transforms, sinks), initialize the SDK, register licensing, and avoid common deployment pitfalls that cause runtime failures.

Core Features & Use Cases

  • Graph-based pipeline construction: Build GStreamer-style directed graphs using MediaBlocksPipeline and connect block pads to create custom topologies for capture, transcode, mix, stream, and record.
  • WPF rendering and device-driven capture: Use VideoRendererBlock with a WPF VideoView for preview, plus DeviceEnumerator-based selection for video/audio sources and sinks.
  • Encoding, muxing, and dynamic inputs: Configure tee + encoders + file/network muxers (MP4, MPEG-TS, WebM) using dynamic sink inputs via IMediaBlockDynamicInputs.
  • Production readiness: Pin wrapper and redist versions, match PlatformTarget architecture, initialize and tear down the SDK correctly, and handle licensing via SetLicenseCertificateAsync(byte[]).

Quick Start

Use the media-blocks-sdk-net-wpf skill to create a WPF project that previews webcam video in a VideoView and records to MP4 with an H264 video encoder and AAC audio encoder, following the pipeline wiring shown in the bundled sample.

Frequently Asked Questions about media-blocks-sdk-net-wpf

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build a custom media pipeline graph in a WPF application?

You can render webcam video in WPF using a VideoRendererBlock connected to a VideoView control. The pipeline captures device-driven sources and displays the preview by wiring the block pads within the MediaBlocksPipeline.

How do I record video to MP4 using a graph-based media pipeline?

You record video to MP4 by constructing a pipeline that connects a source to an H264 video encoder, an AAC audio encoder, and an MP4 muxer sink. This graph-based approach routes media data through transforms into the final file container.

What NuGet package setup is required for the Media Blocks SDK in WPF?

The required NuGet package setup involves pinning the wrapper and redist package versions and matching the x64 or x86 PlatformTarget architecture. Correct SDK initialization and explicit redist setup prevent deployment runtime failures.

How do I apply a license to a MediaBlocksPipeline instance?

To apply a license to a MediaBlocksPipeline instance, call the SetLicenseCertificateAsync method with a byte array containing your license certificate. This license registration must be performed on each pipeline instance you create.

Can I use dynamic sink inputs when muxing to WebM or MPEG-TS?

Yes, you can use dynamic sink inputs when muxing to WebM or MPEG-TS by implementing the IMediaBlockDynamicInputs interface. This allows you to configure tee blocks and encoders to feed file and network muxers dynamically.