FFmpegVideoPlayer.Avalonia 2.9.0

dotnet add package FFmpegVideoPlayer.Avalonia --version 2.9.0
                    
NuGet\Install-Package FFmpegVideoPlayer.Avalonia -Version 2.9.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FFmpegVideoPlayer.Avalonia" Version="2.9.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FFmpegVideoPlayer.Avalonia" Version="2.9.0" />
                    
Directory.Packages.props
<PackageReference Include="FFmpegVideoPlayer.Avalonia" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add FFmpegVideoPlayer.Avalonia --version 2.9.0
                    
#r "nuget: FFmpegVideoPlayer.Avalonia, 2.9.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package FFmpegVideoPlayer.Avalonia@2.9.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=FFmpegVideoPlayer.Avalonia&version=2.9.0
                    
Install as a Cake Addin
#tool nuget:?package=FFmpegVideoPlayer.Avalonia&version=2.9.0
                    
Install as a Cake Tool

NuGet License

FFmpegVideoPlayer.Avalonia

FFmpeg-based media player control for Avalonia, with video and audio-only playback. Works on Windows, macOS, and Linux (including Apple Silicon).

Preview

Install

dotnet add package FFmpegVideoPlayer.Avalonia

Requires Avalonia 11.3.15+ and .NET 8+.

Quick start

1. Initialize FFmpeg (e.g. in Program.cs before the app starts):

using FFmpegVideoPlayer.Core;

FFmpegInitializer.Initialize();

2. Add the control in XAML:

xmlns:ffmpeg="clr-namespace:Avalonia.FFmpegVideoPlayer;assembly=Avalonia.FFmpegVideoPlayer"

<ffmpeg:VideoPlayerControl Source="C:\path\to\video.mp4" ShowControls="True" />

Video and audio-only files are both supported, for example .mp4, .mov, .mp3, .wav, .flac, .ogg, and .m4a.

Audio (OpenAL) is included in the main package. On Windows, install OpenAL Soft or place OpenAL32.dll next to your app — otherwise playback is video-only.

FFmpeg

Platform Default
Windows x64 Bundled DLLs in the package
macOS System/Homebrew (brew install ffmpeg); can auto-install
Linux System packages (apt/dnf/pacman); can auto-install with passwordless sudo

Custom FFmpeg path:

FFmpegInitializer.Initialize(customPath: @"C:\ffmpeg\bin", useBundledBinaries: false);

Subscribe to StatusChanged for progress during discovery or auto-install.

Example

git clone https://github.com/jojomondag/FFmpegVideoPlayer.Avalonia.git
cd FFmpegVideoPlayer.Avalonia/examples/FFmpegVideoPlayerExample
dotnet run

VideoPlayerControl

Properties: Source, AutoPlay, Volume, ShowControls, ShowOpenButton, VideoStretch, VideoBackground, EnableKeyboardShortcuts, RenderingMode (Cpu / OpenGL), AudioPlayerFactory, IconProvider

Methods: Open, OpenUri, Play, Pause, Stop, TogglePlayPause, Seek, ToggleMute

Shortcuts: Space (play/pause), arrow keys (seek/volume), M (mute)

Set AudioPlayerFactory to customize or disable audio. OpenAL via OpenTK is the default.

Custom icons: implement IIconProvider and set IconProvider.

License

MIT

Product 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 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.9.0 96 5/29/2026
2.8.1 121 5/20/2026
2.8.0 165 4/24/2026
2.7.1 105 4/24/2026
2.7.0 97 4/24/2026
2.6.3 244 3/31/2026
2.6.2 113 3/31/2026
2.6.1 116 3/25/2026
2.6.0 106 3/25/2026
2.5.8 104 3/25/2026
2.5.7 105 3/25/2026
2.5.6 103 3/25/2026
2.5.5 101 3/25/2026
2.5.4 106 3/25/2026
2.5.3 101 3/25/2026
2.5.2 106 3/25/2026
2.5.1 104 3/25/2026
2.5.0 101 3/25/2026
2.4.3 106 3/25/2026
2.4.2 106 3/25/2026
Loading failed

v2.9.0: Adds audio-only playback support in VideoPlayerControl and fixes OpenAL audio queue loss that could make audio end early or sound too fast. v2.8.1: Fix #4 — rebuilt against Avalonia 12.0.1 to resolve ReflectionBindingExtension.ProvideValue MissingMethodException in Avalonia 12.x apps. v2.8.0: Close #1 — Linux auto-install via apt/dnf/pacman (with sudo -n), matching the existing macOS Homebrew flow. macOS x64 (Intel) Homebrew was already supported. v2.7.1: Fix #3 — frame-accurate slider seeking. v2.7.0: Fix #2 — macOS NotSupportedException at avformat_open_input (bundled osx-arm64 dylibs removed; initializer validates load and falls back). v2.6.3: OpenAL default audio.