Media Blocks SDK .NET
Create powerful multimedia applications easily and flexibly with Media Blocks SDK .NET โ a modular toolkit that lets you build complex video workflows like a visual constructor (camera โ codec โ output). It supports recording to MP4, MKV, and AVI, as well as streaming via HLS, RTMP, and RTSP, offering a rich set of effects including color correction, deinterlacing, watermarks, screen capture, and audio processing. With built-in computer vision, QR-code recognition, face tracking, and full support for Blackmagic and ONVIF devices, it brings professional-grade features to any project. The SDK works seamlessly with WinForms, WPF, MAUI, Xamarin, and Avalonia, making it easy to integrate advanced media capabilities into desktop and mobile apps.
Installation
Quick Installation with NuGet
Install the SDK directly in your project using Package Manager Console:
Install-Package VisioForge.DotNet.MediaBlocksOr search for VisioForge.DotNet.MediaBlocks in Visual Studio's NuGet Package Manager. View installation guide โ
Key Benefits
Modular Architecture
200+ processing blocks that connect like building blocks to create custom media pipelines
Cross-Platform
Works on Windows, macOS, Linux, Android, and iOS with all major .NET UI frameworks
Hardware Acceleration
GPU-accelerated encoding/decoding with NVIDIA, Intel, and AMD support for maximum performance
Pipeline Examples
// Create MediaBlocks pipeline
_pipeline = new MediaBlocksPipeline();
// Add file source
var fileSourceSettings = await UniversalSourceSettings.CreateAsync("video.mp4");
var videoStreamAvailable = fileSourceSettings.GetInfo().VideoStreams.Count > 0;
var audioStreamAvailable = fileSourceSettings.GetInfo().AudioStreams.Count > 0;
var fileSource = new UniversalSourceBlock(fileSourceSettings);
// Add video renderer
if (videoStreamAvailable)
{
var videoRenderer = new VideoRendererBlock(_pipeline, VideoView1);
_pipeline.Connect(fileSource, videoRenderer);
}
// Add audio output
if (audioStreamAvailable)
{
var audioOutputDevice = (await DeviceEnumerator.Shared.AudioOutputsAsync(
AudioOutputDeviceAPI.DirectSound))[0];
var audioOutput = new AudioRendererBlock(
new AudioRendererSettings(audioOutputDevice));
_pipeline.Connect(fileSource, audioOutput);
}
// Start playback
await _pipeline.StartAsync();SIMPLE PLAYER
The simple player pipeline uses the UniversalSourceBlock to read and decode the source file, the VideoRendererBlock to display video, and the AudioRendererBlock to play audio.
Interactive Pipeline Visualization
Loading pipeline diagram...
ADVANCED PLAYER
The advanced player pipeline includes the UniversalSourceBlock for decoding files or streams, video and audio renderers, and effects processing blocks.
// Create MediaBlocks pipeline
_pipeline = new MediaBlocksPipeline();
// Add file source
var fileSourceSettings = await UniversalSourceSettings.CreateAsync(edFilename.Text);
var videoStreamAvailable = fileSourceSettings.GetInfo().VideoStreams.Count > 0;
var audioStreamAvailable = fileSourceSettings.GetInfo().AudioStreams.Count > 0;
var fileSource = new UniversalSourceBlock(fileSourceSettings);
// Add video renderer, text overlay and image overlay
if (videoStreamAvailable)
{
var videoRenderer = new VideoRendererBlock(_pipeline, VideoView1);
var textOverlay = new TextOverlayBlock(new TextOverlaySettings("Hello world!"));
var imageOverlay = new ImageOverlayBlock(new ImageOverlaySettings("logo.png"));
_pipeline.Connect(fileSource, textOverlay);
_pipeline.Connect(textOverlay, imageOverlay);
_pipeline.Connect(imageOverlay, videoRenderer);
}
// Add audio output and equalizer
if (audioStreamAvailable)
{
var audioOutputDevice = (await DeviceEnumerator.Shared.AudioOutputsAsync(AudioOutputDeviceAPI.DirectSound))[0];
var audioOutput = new AudioRendererBlock(new AudioRendererSettings(audioOutputDevice));
var equalizer = new EqualizerParametricBlock();
// set some equalizer settings
_pipeline.Connect(fileSource, equalizer);
_pipeline.Connect(equalizer, audioOutput);
}
// Start playback
await _pipeline.StartAsync();Advanced Player Pipeline with Effects
Loading pipeline diagram...
// Create MediaBlocksPipeline object
_pipeline = new MediaBlocksPipeline();
// Add default video and audio sources
var videoSources = (await DeviceEnumerator.Shared.VideoSourcesAsync()).ToList();
var videoSource = new SystemVideoSourceBlock(new VideoCaptureDeviceSourceSettings(
videoSources.Find(x => x.Name.Contains("920"))));
var audioSources = (await DeviceEnumerator.Shared.AudioSourcesAsync()).ToList();
var audioSource = new SystemAudioSourceBlock(audioSources[0].CreateSourceSettings());
// Add video renderer
var videoRenderer = new VideoRendererBlock(_pipeline, videoView: VideoView1);
// Add audio renderer
var audioRenderers = (await DeviceEnumerator.Shared.AudioOutputsAsync()).ToList();
var audioRenderer = new AudioRendererBlock(new AudioRendererSettings(audioRenderers[0]));
// Connect everything
_pipeline.Connect(videoSource, videoRenderer);
_pipeline.Connect(audioSource, audioRenderer);
// Start preview
await _pipeline.StartAsync();CAMERA PREVIEW
The camera/microphone simple preview pipeline contains device source blocks and video/audio renderer blocks.
Default devices will be used.
Camera Preview Pipeline
Loading pipeline diagram...
RTSP PREVIEW
The RTSP preview pipeline, which includes the RTSP source block (with decoders inside), video and audio renderers.
// Create Media Blocks pipeline
_pipeline = new MediaBlocksPipeline();
// Create video renderer
var videoRenderer = new VideoRendererBlock(_pipeline, VideoView1);
// Add RTSP camera source
var rtsp = await RTSPSourceSettings.CreateAsync(new Uri(edURL.Text),
edLogin.Text, edPassword.Text, audioEnabled: cbAudioStream.Checked);
var rtspSource = new RTSPSourceBlock(rtsp);
_pipeline.Connect(rtspSource, videoRenderer);
// Add audio output (if required)
if (cbAudioStream.Checked && rtsp.IsAudioAvailable())
{
var audioOutputDevice = (await DeviceEnumerator.Shared.AudioOutputsAsync(
AudioOutputDeviceAPI.DirectSound))[0];
var audioOutput = new AudioRendererBlock(new AudioRendererSettings(audioOutputDevice));
_pipeline.Connect(rtspSource, audioOutput);
}
// Start IP camera preview
await _pipeline.StartAsync();RTSP Stream Pipeline
Loading pipeline diagram...
// Create the pipeline
_pipeline = new MediaBlocksPipeline();
// Add video and audio sources
var videoSources = (await DeviceEnumerator.Shared.VideoSourcesAsync()).ToList();
var videoSource = new SystemVideoSourceBlock(new VideoCaptureDeviceSourceSettings(videoSources[0]));
var audioSources = (await DeviceEnumerator.Shared.AudioSourcesAsync()).ToList();
var audioSource = new SystemAudioSourceBlock(audioSources[0].CreateSourceSettings());
// Add video renderer and specify VideoView control
var videoRenderer = new VideoRendererBlock(_pipeline, videoView: VideoView1);
// Add audio renderer
var audioRenderers = (await DeviceEnumerator.Shared.AudioOutputsAsync()).ToList();
var audioRenderer = new AudioRendererBlock(new AudioRendererSettings(audioRenderers[0]));
// Configure MP4 output
var output = new MP4OutputBlock(Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.MyVideos), "output.mp4"));
// Add video and audio tees
var videoTee = new TeeBlock(2, MediaBlockPadMediaType.Video);
var audioTee = new TeeBlock(2, MediaBlockPadMediaType.Audio);
// Connect everything
_pipeline.Connect(videoSource, videoTee);
_pipeline.Connect(audioSource, audioTee);
_pipeline.Connect(videoTee, videoRenderer);
_pipeline.Connect(audioTee, audioRenderer);
_pipeline.Connect(videoTee, output);
_pipeline.Connect(audioTee, output);
// Start MP4 recording
await _pipeline.StartAsync();CAPTURE WITH PREVIEW
The capture pipeline has two tee blocks that are used to split video and audio streams, allowing video/audio preview along with video capture.
Capture with Preview Pipeline
Loading pipeline diagram...
VisioForge Media Blocks SDK .Net major features include:
Core Features
- โข Audio/Video Preview
- โข Video and Audio Capture to a Wide Range of Formats
- โข Frame Capture to Bitmap Class, BMP, JPEG, and PNG Files
- โข Video Processing and Effects (CPU/GPU)
- โข Video Capture Device Control
- โข Network Streaming
- โข Motion Detection
- โข Custom Interfaces Support
- โข Computer Vision API
- โข PIP (Picture-In-Picture)
- โข Screen Capture/Window Capture
- โข Face Detection and Object Tracking
- โข Multiple Output Screens Support
- โข Audio Capture from Speakers
- โข Audio/Video File Tags Reading and Writing Support
Supported Input Devices
- โข USB Web Cameras and Capture Devices (Including 4K)
- โข JPEG/MJPEG, MPEG-4 and H.264 HTTP/RTSP/RTMP IP Cameras/Servers
- โข DV and HDV MPEG-2 Camcorders
- โข PCI Capture Cards
- โข TV Tuners (With/Without Internal MPEG Encoder)
- โข HD Format Supported for IP Cameras
- โข ONVIF IP Cameras with PTZ Support
- โข Blackmagic Decklink Devices
- โข Audio Capture Devices and Sound Cards
- โข ASIO Devices
Professional Hardware
- โข Blackmagic Decklink Input/Output Support
- โข FLIR/Teledyne Cameras (USB3Vision/GigE)
- โข Basler Cameras (USB3Vision/GigE)
- โข DV and HDV MPEG-2 Camcorders
- โข PCI Capture Cards
- โข TV Tuners (With/Without MPEG Encoder)
- โข ONVIF IP Cameras with PTZ Support
- โข ASIO Devices
Sources
- โข Allied Vision Cameras
- โข Animated GIF
- โข Basler Cameras (USB3Vision/GigE)
- โข CDG Karaoke
- โข Fallback Switch
- โข GenICam (Industrial Cameras)
- โข HTTP
- โข HTTP MJPEG
- โข Image Sequence
- โข Local File
- โข Memory Buffer
- โข NDI
- โข PulseAudio
- โข Raspberry Pi Camera
- โข RTMP
- โข RTSP
- โข RTSP RAW
- โข Screen Capture
- โข SRT
- โข System Audio
- โข System Video
- โข Test Signal
- โข UDP/RTP
- โข URI (File/Network)
Audio Processing
- โข Amplify
- โข Balance
- โข Sample Format Converter
- โข Load Normalizer
- โข Mixer
- โข Resampler
- โข Sample Grabber
- โข Timestamp Corrector
- โข Chebyshev Band Pass Reject
- โข Chebyshev Limit
- โข Compressor/Expander
- โข Csound Filter
- โข EBU R128 Level
- โข Echo
- โข Equalizer (10-Band)
- โข Equalizer (Parametric)
- โข HRTF Render
- โข Karaoke
- โข Remove Silence
- โข Reverberation
- โข Scale/Tempo
- โข Volume
- โข VU Meter
- โข Wide Stereo
Barcode Reader
- โข QR Code
- โข UPC-A, UPC-E
- โข EAN-8, EAN-13
- โข Code 39
- โข Code 93
- โข Code 128
- โข Codabar
- โข ITF
- โข RSS-14
- โข Data Matrix
- โข Aztec
- โข PDF-417
Audio Encoders
- โข AAC
- โข ADPCM
- โข ALAW
- โข AptX
- โข FLAC
- โข MP2
- โข MP3
- โข OPUS
- โข Speex
- โข Vorbis
- โข WAV
- โข Wavpack
- โข WMA (Windows Media Audio)
Video Encoders (CPU/GPU)
- โข AV1
- โข DV
- โข GIF
- โข H.264
- โข H.265/HEVC
- โข MJPEG
- โข MPEG-2
- โข MPEG-4
- โข PNG
- โข Theora
- โข VP8/VP9 (VPX)
- โข WMV (Windows Media Video)
- โข NVENC, AMD, Intel Hardware Encoders Support
- โข iOS/macOS/Android Hardware Encoders Support
Video Processing
- โข Aging
- โข Alpha Combine
- โข Auto Deinterlace
- โข Bayer to RGB
- โข Chroma Key
- โข Codec Alpha Demux
- โข Color Effects
- โข Deinterlace
- โข Dice
- โข Edge Detection
- โข Fish Eye
- โข Flip/Rotate
- โข Gamma
- โข Gaussian Blur
- โข Grayscale
- โข Image Overlay
- โข Image Overlay Cairo
- โข Interlace
- โข Key Frame Detector
- โข LUT Processor
- โข Mirror
- โข Moving Blur
- โข Moving Echo
- โข Moving Zoom Echo
- โข Optical Animation B&W
- โข Overlay Manager
- โข Perspective
- โข Pinch
- โข Pseudo 3D
- โข QR Code Overlay
- โข Resize
- โข Sample Grabber
- โข Sobel Edge
- โข Sphere
- โข Square
- โข Stretch
- โข Text Overlay
- โข Tunnel
- โข Twirl
- โข Video Balance
- โข Pixel Format Converter
- โข Video Mixer
- โข Warped Mirror
- โข Water Ripple
- โข Zoom Box
File Sinks
- โข ASF
- โข AVI
- โข DASH
- โข HLS
- โข HTTP MJPEG Live
- โข MKV (Matroska)
- โข MOV (QuickTime)
- โข MP4
- โข MPEG-PS
- โข MPEG-TS
- โข MXF
- โข OGG
- โข WAV
- โข WebM
Network Streaming
- โข Facebook Live
- โข HLS
- โข NDI
- โข RTMP
- โข RTSP
- โข Shoutcast
- โข SRT
- โข YouTube Live
Blackmagic Decklink
- โข Audio Sink
- โข Audio Source
- โข Video Sink
- โข Video Source
Audio Visualizers
- โข Bumpscope
- โข Corona
- โข Infinite
- โข Jakdaw
- โข Jess
- โข LV Analyzer
- โข LV Scope
- โข Oinksie
- โข Spacescope
- โข Spectrascope
- โข Synaescope
- โข Wavescope
Video Decoders
- โข AV1 Decoder
- โข H.264 Decoder
- โข HEVC Decoder
- โข JPEG Decoder
- โข VP8 Decoder
- โข VP9 Decoder
- โข NVIDIA, Intel and AMD Accelerated Decoders
- โข Android Hardware Decoders
- โข iOS Hardware Decoders
Special Blocks
- โข Barcode Detector
- โข Data Processor
- โข Data Sample Grabber
- โข Debug Timestamp
- โข Decryptor
- โข Encryptor
- โข Multi Queue
- โข Null Renderer
- โข Queue
- โข SRTP Decryptor
- โข SRTP Encryptor
- โข Tee (Splitter)
Pricing
Choose between annual subscription or lifetime license
Regular License
- Free minor and major upgrades for one year
- SDK continues functioning after subscription ends
- Priority support
- Auto-renews annually (can cancel anytime)
- All 200+ processing blocks included
Lifetime License
- Unlimited updates forever
- Priority support and fixes
- One-time payment
- All future features included
- All 200+ processing blocks included
Free for non-commercial use. Please contact us to get a free license.
All licenses include royalty-free distribution rights.
System Requirements
Minimum requirements for development and deployment across platforms
| Operating Systems |
|
| .NET Framework |
|
| Hardware |
|
| UI Frameworks |
|
Documentation & Resources
Everything you need to get started with Media Blocks SDK
Ready to Get Started?
Download the free trial and start building your media pipeline today
