DevLog 20250506 C# Video Processing Foundation Library

BackerLeader posted Originally published at dev.to 1 min read

Today I need to find a suitable foundational library for video processing. FFMpegCore works for one-shot things but despite a fluent API, its interface is still too command line like.

Here is what I found out:

OpenCvSharp LibVLCSharp FFMediaToolkit
Frames ✅ decode / encode ✅ (via callbacks)
Audio ✅ decode / encode / mux
Extra libs \~5 MB/platform +7 MB +7 MB
Licence Apache‑2.0 LGPLv2.1 MIT
Platforms Win / mac / Linux / Arm Win / mac / Linux / iOS / Android Win / mac / Linux

LibVLCSharp seems more focused on directly displaying things (e.g. in Xamarine and WPF) instead of low-level API based processing; FFMediaToolkit, on the other hand, still depends on FFMPEG and can't avoid licensing issue. Eventually, I had to go with separate video + audio processing in favor of OpenCvSharp (it's Apache-2.0 by the way).

Notice OpenCVSharp has some advantage over EmguCV for custom dev:

OpenCvSharp Emgu.CV
Licence Apache-2.0 (fully permissive) GPL v3 or commercial licence
Interop model Pure P/Invoke (no C++/CLI), works on any .NET core runtime Historically C++/CLI wrapper (needs Windows for full feature set), .NET Standard P/Invoke layer added later
NuGet size (native) 4–6 MB per RID (modular runtime packages) 30 MB + for the “opencv‑world” monolith, or 90 MB for emgucv‑runtime‑ubuntu
GPU (CUDA) support Provided in separate OpenCvSharp4.runtime.dnn package Official CUDA builds, but Windows‑only binaries unless you compile yourself
API surface \~1:1 with OpenCV C++ names (easy to port C++ samples) Thicker .NET façade (e.g. Image<Bgr, byte> types), extra helpers
Cross‑platform stability Actively tested on Windows / Linux / macOS / arm64 Windows the main focus; Linux/macOS possible with libopencv from distro or big runtime package
Learning curve If you know OpenCV C++ you feel at home Higher‑level abstractions can be friendlier for newcomers
Commercial support Community‑driven Paid licences & support available from Emgu CV, Inc.

1 Comment

0 votes

More Posts

DevLog 20250724: C# Scripting, Pure 2, Updated + Some Recap

Methodox - Jul 24

DevLog 20250706: Analyzing (C#) Project Dependencies

Methodox - Jul 6

Building an Order Processing Saga with MassTransit

Spyros - Aug 12

Why Records in C# Are Great (and So Nice to Work With)

Spyros - May 10

DevLog 20250726: C# is the way, Python gets things done, JavaScript is convenient

Methodox - Jul 26
chevron_left