Flyleaf.FFmpeg.ABI
9.0.0
dotnet add package Flyleaf.FFmpeg.ABI --version 9.0.0
NuGet\Install-Package Flyleaf.FFmpeg.ABI -Version 9.0.0
<PackageReference Include="Flyleaf.FFmpeg.ABI" Version="9.0.0" />
<PackageVersion Include="Flyleaf.FFmpeg.ABI" Version="9.0.0" />
<PackageReference Include="Flyleaf.FFmpeg.ABI" />
paket add Flyleaf.FFmpeg.ABI --version 9.0.0
#r "nuget: Flyleaf.FFmpeg.ABI, 9.0.0"
#:package Flyleaf.FFmpeg.ABI@9.0.0
#addin nuget:?package=Flyleaf.FFmpeg.ABI&version=9.0.0
#tool nuget:?package=Flyleaf.FFmpeg.ABI&version=9.0.0
Flyleaf.FFmpeg.ABI
Low-level, ABI-focused .NET bindings for FFmpeg.
Flyleaf.FFmpeg.ABI provides direct access to FFmpeg's native structures, unions, functions, callbacks, constants, macros, and supported inline functions with minimal abstraction.
The bindings are generated with ClangABI directly from the FFmpeg C headers, with an emphasis on ABI correctness, performance, portability, and Native AOT compatibility.
Features
- Direct, low-level access to the FFmpeg C API
- Native structures and unions with ABI-correct layouts
- Functions, callbacks, constants, macros, and supported inline functions
- Fixed-size and inline arrays
- Native function pointers and callback signatures
- Cross-platform native type handling
- FFmpeg hardware-context headers included
- Supporting SDK headers included during generation where required
- Minimal abstraction and marshaling
- Native AOT compatible
- Windows and Linux ABI targets
Full FFmpeg Header Parsing
The bindings are generated from a broad FFmpeg public-header surface rather than only the most commonly used libraries or declarations.
This includes FFmpeg hardware-context headers and the external SDK headers required to parse them, including APIs related to:
- D3D11VA / D3D12VA / DXVA
- CUDA
- AMF
- OpenCL
- Vulkan
- Intel oneVPL / QSV
- VA-API
- VDPAU
The goal is to expose the native FFmpeg ABI as completely and faithfully as practical, including less commonly used APIs that are often omitted from smaller binding sets.
Cross-Platform ABI
A C declaration does not necessarily have the same binary representation on every platform.
For example, on 64-bit platforms:
Windows (LLP64) long = 32-bit
Linux (LP64) long = 64-bit
Types such as long, unsigned long, size_t, ptrdiff_t, intptr_t, and platform-dependent structures therefore need to be interpreted against the correct target ABI.
Flyleaf.FFmpeg.ABI is generated using the appropriate Clang target environment for each supported platform rather than assuming that declarations generated on one operating system are valid everywhere.
This also applies to platform-specific FFmpeg hardware contexts and their dependent system or SDK headers.
Installation
dotnet add package Flyleaf.FFmpeg.ABI
or:
<PackageReference Include="Flyleaf.FFmpeg.ABI" Version="..." />
Minimum Usage
using Flyleaf.FFmpeg;
using static Flyleaf.FFmpeg.Raw;
LoadLibraries(
@"C:\path\to\ffmpeg\bin",
LoadProfile.All);
Console.WriteLine(av_version_info_str());
LoadLibraries loads the required native FFmpeg libraries and configures the bindings to resolve them from the supplied directory.
The native FFmpeg binaries themselves are not included in the package.
Native AOT
Flyleaf.FFmpeg.ABI is designed to be compatible with .NET Native AOT.
The generated bindings favor direct native representations, unmanaged pointers, blittable structures, and native function pointers while avoiding unnecessary runtime-generated interop machinery.
A Native AOT application can therefore use the bindings in the same way.
For the application itself, enable Native AOT in the project:
<PropertyGroup>
<PublishAot>true</PublishAot>
</PropertyGroup>
and publish for a concrete runtime identifier such as win-x64.
Low-Level by Design
Flyleaf.FFmpeg.ABI intentionally stays close to the native FFmpeg API.
It does not attempt to hide pointers, ownership rules, native lifetimes, or FFmpeg's underlying API model behind a managed abstraction layer.
That makes it suitable as a foundation for higher-level wrappers and media frameworks while keeping the ABI layer small, predictable, and efficient.
Generated with ClangABI
The bindings are generated using ClangABI, a C-to-C# ABI binding generator powered by ClangSharp.
Generation includes support for:
- Records and unions
- Enums
- Functions
- Native callbacks
- Fixed arrays
- Macros
- Inline functions
- Platform-specific native types
- Custom post-processing and generation rules
FFmpeg Versions
Package releases target specific FFmpeg ABI versions.
Applications should use native FFmpeg libraries compatible with the version targeted by the package, particularly when FFmpeg library major versions change.
Flyleaf
Flyleaf.FFmpeg.ABI is also used as the native FFmpeg binding layer for Flyleaf.
Flyleaf provides the higher-level media framework, playback, decoding, rendering, and workflow functionality built on top of these low-level bindings.
License
Flyleaf.FFmpeg.ABI is licensed under the MIT License.
FFmpeg and the third-party SDK headers used during binding generation remain subject to their respective licenses.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages (2)
Showing the top 2 NuGet packages that depend on Flyleaf.FFmpeg.ABI:
| Package | Downloads |
|---|---|
|
FlyleafLib
Media Player .NET Library for WinUI 3/WPF/WinForms (based on FFmpeg/DirectX) |
|
|
Flyleaf.FFmpeg
FFmpeg Bindings for C#/.NET (Extended) |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 9.0.0 | 131 | 10/8/2026 |
| 9.0.0-alpha | 83 | 10/6/2026 |
Initial alpha release