VisioForge

A commercial GStreamer SDK for .NET and C#

Media Blocks SDK .NET is a commercial .NET SDK built on GStreamer. You build pipelines in C# from typed blocks — sources, encoders, effects and sinks — instead of string pipelines and raw elements, and you can still wrap any GStreamer element as a block when you need one.

Is there a commercial GStreamer SDK for .NET?

Yes. VisioForge Media Blocks SDK .NET runs its media pipelines on GStreamer and is sold with a commercial license and VisioForge support. It is not a one-to-one copy of the GStreamer API: each block wraps one or more GStreamer elements behind a C# class with a settings object, and MediaBlocksPipeline.Connect links the blocks. When the SDK has no block for an element you need, CustomMediaBlock wraps it by its factory name or a bin description, and hands you the raw Gst.Element.

GStreamer bindings vs Media Blocks SDK .NET

gstreamer-sharp bindings (GstSharp NuGet package)Media Blocks SDK .NET
What you program againstThe GStreamer API itself, generated from GObject introspection: elements, pads, caps and bus messagesTyped blocks with settings classes, connected with MediaBlocksPipeline.Connect; raw elements through CustomMediaBlock
GStreamer runtimeNot in the package; you install or bundle GStreamer for every target platformWindows, macOS, Android and iOS: native libraries in the VisioForge.CrossPlatform.Core.* NuGet packages, plus a Java bindings project on Android. Linux: the distribution's GStreamer 1.22 or later (Ubuntu 24.04 ships 1.24) from its package manager, plus VisioForge.CrossPlatform.Core.Linux.x64 or VisioForge.CrossPlatform.Core.Linux.arm64
Latest NuGet releaseGstSharp 1.18.0, published in September 2020, with .NET Framework 4.5 assembliesVisioForge.DotNet.MediaBlocks, released with every SDK version
Elements without a wrapperEvery element is used rawCustomMediaBlock wraps any element or bin description as a block
UI and platformsVideo output and UI integration are yours to buildVideo views for WinForms, WPF, WinUI 3, MAUI, Uno Platform and Avalonia across Windows, macOS, Linux, Android and iOS; a Unity package for Windows, macOS, Android and iOS
License and supportOpen-source bindingsCommercial license, royalty-free distribution, support from VisioForge

What Media Blocks SDK .NET adds on top of GStreamer

The SDK ships in the VisioForge.DotNet.MediaBlocks NuGet package. GStreamer does the media work; the SDK gives it a C# shape.

  • Typed blocks instead of string pipelines: RTSPSourceBlock, H264EncoderBlock or MP4SinkBlock take a settings object, so a typo in an element or property name is a compile error rather than a runtime failure
  • Encoder selection: the parameterless H264EncoderBlock picks a hardware encoder when one is available and falls back to a software encoder
  • The runtime comes with the NuGet packages on Windows, macOS, Android and iOS; on Linux the SDK uses the distribution's GStreamer
  • Any GStreamer element when you need it: CustomMediaBlock takes a factory name or a bin description, sets properties from a dictionary and raises OnElementAdded with the raw Gst.Element
  • Your own typed blocks: subclass MediaBlock to wrap an element with a settings class and an IsAvailable() check, the same way the built-in blocks are written
  • The same engine in the higher-level SDKs: VideoCaptureCoreX in Video Capture SDK .NET and MediaPlayerCoreX in Media Player SDK .NET run on the same GStreamer-based pipeline

Where it is used

From a gst-launch prototype to a C# application

Rebuild a pipeline you tried on the command line from typed blocks, and keep the element the SDK does not wrap in a CustomMediaBlock.

IP camera recording and restreaming

Record RTSP and ONVIF cameras to MP4 or MPEG-TS and restream them over HLS, RTMP, RTSP or SRT from one pipeline.

Cross-platform media apps

Write the pipeline once in C# and run it on Windows, macOS, Linux, Android and iOS, with video views for WPF, MAUI, Avalonia and the other supported UI frameworks.

Third-party and custom GStreamer plugins

Use a vendor's camera plugin, an element from gst-plugins-bad or a plugin you wrote yourself inside a Media Blocks pipeline.

Code Examples

The first example uses only typed blocks; the second wraps a GStreamer element with CustomMediaBlock, as in the CustomGrayscaleBlock console sample.

Record an RTSP camera to MP4 with typed blocks

C#

Wrap any GStreamer element as a block

C#

Where GStreamer sits

Your code works with blocks. Each block builds its GStreamer elements when the pipeline starts, and the native GStreamer libraries come from the VisioForge NuGet packages or, on Linux, from the system.

Your C# code
Media Blocks (typed blocks, CustomMediaBlock)
GStreamer elements
GStreamer runtime

Frequently Asked Questions

Does a commercial .NET SDK for GStreamer exist?▼
Yes. Media Blocks SDK .NET from VisioForge is a commercial .NET SDK built on GStreamer. It is installed from the VisioForge.DotNet.MediaBlocks NuGet package, licensed commercially with royalty-free distribution, and supported by VisioForge.
Is Media Blocks SDK .NET a one-to-one wrapper of the GStreamer API?▼
No. It is a pipeline SDK on top of GStreamer: you work with typed blocks such as RTSPSourceBlock, H264EncoderBlock and MP4SinkBlock and connect them with MediaBlocksPipeline.Connect. Elements, pads and caps are handled inside the blocks. When you need the element itself, CustomMediaBlock and the OnElementAdded event give you the raw Gst.Element.
Can I use a GStreamer element the SDK does not wrap?▼
Yes. Create CustomMediaBlockSettings with the element's factory name, declare its input and output pads, put property values into ElementParams and pass the settings to CustomMediaBlock. Elements that create their pads at runtime, such as demuxers, are supported with UsePadAddedEvent. For reuse, subclass MediaBlock to make a typed block of your own.
Can I use a gst-launch pipeline description?▼
Within a block, yes. CustomMediaBlock accepts a bin description in square brackets, for example "[ videoconvert ! videobalance saturation=0 ! videoconvert ]", and parses it into one bin with input and output pads. The pipeline around it, from source to sink, is built from blocks.
Do I need to install GStreamer separately?▼
On Windows, macOS, Android and iOS, no: the GStreamer libraries come in the VisioForge.CrossPlatform.Core.* NuGet packages for each platform. On Android, the app also adds a project reference to the Java bindings project VisioForge.Core.Android.X10.csproj from the VisioForge samples repository. On Linux, the SDK uses the distribution's GStreamer, version 1.22 or later (Ubuntu 24.04 ships 1.24), installed with the distribution's package manager (apt on Ubuntu and Debian); add the VisioForge.CrossPlatform.Core.Linux.x64 or VisioForge.CrossPlatform.Core.Linux.arm64 package.
Which platforms and UI frameworks are supported?▼
Windows, macOS, Linux, Android and iOS, with video views for WinForms, WPF, WinUI 3, .NET MAUI, Uno Platform and Avalonia. The Unity package targets Windows, macOS, Android and iOS.
How do I try it?▼
Download the fully functional 30-day trial or add the VisioForge.DotNet.MediaBlocks package from NuGet and run the samples. Depending on the output, a watermark or unregistered notice may appear until a license is applied. Licenses are sold per year or as a lifetime license; prices are on the Media Blocks SDK .NET page.