Media Blocks SDK for C# .NET — Modular Multimedia Pipeline API¶
Introduction¶
Media Blocks SDK for .NET is a pipeline-based multimedia framework that lets you build custom video and audio processing workflows in C#. Instead of using a fixed API with predefined behavior, you create a pipeline by connecting typed blocks — sources, encoders, effects, renderers, and sinks — to construct exactly the processing chain your application needs.
The SDK runs on Windows, macOS, Linux, Android, and iOS. It powers use cases that the higher-level Video Capture SDK and Media Player SDK cannot cover: multi-source compositing, custom transcoding pipelines, simultaneous encoding to multiple formats, real-time video effects chains, and integration with hardware like Blackmagic Decklink or industrial cameras.
When to Use Media Blocks¶
Media Blocks SDK is the right choice when you need full control over the multimedia pipeline. Use it instead of (or alongside) the other VisioForge SDKs when:
| Scenario | Recommended SDK |
|---|---|
| Simple webcam recording to MP4 | Video Capture SDK |
| Play a video file with standard controls | Media Player SDK |
| Custom pipeline: source → effects → encode → multiple outputs | Media Blocks SDK |
| Live video compositing from multiple sources | Media Blocks SDK |
| Transcoding / format conversion with custom processing | Media Blocks SDK |
| RTSP recording with post-processing (overlay, resize, re-encode) | Media Blocks SDK |
| Cross-platform Avalonia or MAUI media app | Media Blocks SDK |
| Integration with Decklink, GenICam, or NVIDIA hardware | Media Blocks SDK |
Common Use Cases¶
Video File Transcoding and Format Conversion¶
Convert video files between formats (e.g., AVI to MP4, MKV to WebM) with full control over codecs, resolution, bitrate, and processing. Chain resize, deinterlace, or color correction blocks between the source and encoder.
Custom Camera Capture with Processing Pipeline¶
Build camera capture workflows that go beyond simple recording. Insert real-time effects, text overlays, or computer vision blocks between the camera source and the file sink. Output to multiple destinations simultaneously — preview window, file, and network stream.
See: Camera Viewer Application Tutorial
Live Video Compositing and Mixing¶
Combine multiple video sources into a single output with the Live Video Compositor. Position, scale, and layer video feeds for multi-camera production, picture-in-picture, or surveillance grid layouts.
RTSP Stream Recording with Post-Processing¶
Capture RTSP streams from IP cameras and apply processing before saving — resize to lower resolution, add timestamp overlays, re-encode with different quality settings, or split into segments.
See: RTSP Stream Save Guide | ONVIF Capture with Post-Processing
Text and Image Overlay / Watermarking¶
Add text, images, or SVG overlays to live video or recorded files using the Overlay Manager Block. Useful for watermarking, timestamp insertion, branding, and on-screen display.
Barcode and QR Code Reading from Video¶
Process live camera feeds or video files to detect and decode barcodes and QR codes in real-time.
See: Barcode & QR Code Reader Guide
Pre-Event Recording¶
Implement circular buffer recording that captures video continuously and writes event clips (including footage from before the trigger) to disk.
See: Pre-Event Recording Guide
Platform Support¶
| Platform | UI Frameworks | Notes |
|---|---|---|
| Windows x64 | WinForms, WPF, MAUI, Avalonia, Console | Full feature set including DirectShow bridges |
| macOS | MAUI, Avalonia, Console | AVFoundation camera access |
| Linux x64 | Avalonia, Console | V4L2 camera, GStreamer-based processing |
| Android | MAUI | Via MAUI integration |
| iOS | MAUI | Via MAUI integration |
Core SDK Components¶
Sources¶
Source Blocks ingest media from cameras, files, network streams, virtual generators, and capture hardware.
Video Processing¶
- Video Encoders — H.264, H.265/HEVC, VP8, VP9, AV1 with GPU acceleration (NVENC, AMF, Quick Sync)
- Video Decoders — Hardware and software decoding for all major codecs
- Video Processing — Resize, crop, rotate, color correction, deinterlace, effects
- Video Rendering — Display video in WinForms, WPF, MAUI, and Avalonia controls
- Live Video Compositor — Multi-source mixing and compositing
Audio Processing¶
- Audio Encoders — AAC, MP3, Vorbis, Opus, FLAC encoding
- Audio Processing — Filters, effects, sample rate conversion, channel mixing
- Audio Rendering — Playback to system audio devices
- Audio Visualizers — Waveform and spectrum visualization blocks
Output and Connectivity¶
- Sinks — Write to MP4, WebM, AVI, MKV, TS files and network streams
- Output Blocks — High-level output configurations
- Bridges — Connect pipeline segments and synchronize blocks
- Demuxers and Parsers — Stream demultiplexing and parsing
Hardware and Platform-Specific¶
- NVIDIA — NVENC/NVDEC hardware acceleration blocks
- Blackmagic Decklink — Professional capture and playback hardware
- OpenCV — Computer vision integration
- OpenGL — GPU-based video processing
- AWS — Cloud integration blocks
- RTSP Server — Serve video as an RTSP stream
Getting Started¶
Ready to build your first pipeline? The Developer Quick Start Guide covers installation, core concepts, pipeline architecture, and step-by-step code examples:
Additional getting started tutorials:
- Complete Pipeline Implementation
- Media Player Development
- Camera Viewer Application
- Device Enumeration
Guides¶
- Save RTSP Stream to File
- RTSP Stream Viewer and IP Camera Player
- ONVIF Capture with Post-Processing
- Barcode & QR Code Reader
- Pre-Event Recording
- Audio Metadata Tags
- Custom Video Effects and OpenGL Shaders