DevLog 20250506 C# Video Processing Foundation Library
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 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.

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 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. |