Libvlcsharp
Cross-platform .NET/Mono bindings for LibVLC
Install / Use
/learn @videolan/LibvlcsharpREADME
LibVLCSharp
LibVLCSharp is a cross-platform audio and video API for .NET platforms based on VideoLAN's LibVLC Library. It provides a comprehensive multimedia API that can be used across mobile, server and desktop to render video and output audio as well as encode and stream.
The official repository URL for this repo is https://code.videolan.org/videolan/LibVLCSharp.
- Features
- Supported platforms
- Installation
- Getting started
- Documentation
- Ebook
- Migrating from Vlc.DotNet
- Samples
- Quick API overview
- Roadmap
- Versioning
- Release Notes
- Contribute
- Questions and Support
- Code of Conduct
- Licenses
Features
Check out libvlc-nuget to get a basic understanding of how libvlc works, what it can offer and how to install it with NuGet.
Some of the features include:
- Play every media file formats, every codec and every streaming protocols
- Run on every platform, from desktop (Windows, Linux, Mac) to mobile (Android, iOS) and TVs
- Hardware and efficient decoding on every platform, up to 8K
- Network browsing for distant filesystems (SMB, FTP, SFTP, NFS...) and servers (UPnP, DLNA)
- Playback of Audio CD, DVD and Bluray with menu navigation
- Support for HDR, including tonemapping for SDR streams
- Audio passthrough with SPDIF and HDMI, including for Audio HD codecs, like DD+, TrueHD or DTS-HD
- Support for video and audio filters
- Support for 360 video and 3D audio playback, including Ambisonics
- Able to cast and stream to distant renderers, like Chromecast and UPnP renderers.
Most things you can achieve with the regular VLC desktop app, you can also achieve using libvlc.
MediaPlayerElement
Full featured video control for Xamarin.Forms available in LibVLCSharp.Forms (iOS/Android) and Uno platform (iOS/Android/UWP).
<h3 align="center"> <img src="src/assets/media-element.jpg"/> </h3>Supported platforms
Mono, .NET Framework and .NET Core runtimes are supported.
- Xamarin.Android
- Xamarin.iOS
- Xamarin.tvOS
- Xamarin.Mac (Cocoa)
- Windows Classic (WPF, WinForms, GTK)
- Windows Universal (UWP for Desktop, mobile and Xbox)
- Linux including desktop, server and Raspberry Pi (GTK)
- Xamarin.Forms
- MAUI
- Uno Platform 5 (WinUI, Android, iOS)
- Avalonia (Windows, macOS, Linux)
- .NET Standard 1.1 and 2.0
- .NET Framework 4.0 and later
- .NET Core (including ASP.NET Core)
- Unity3D
- Windows Classic
- Android
- UWP
- iOS
- macOS
Installation
- Install LibVLC in your platform specific project.
LibVLC is the actual VLC engine written mostly in C/C++ and compiled for your target platform. More information here.
| Platform | LibVLC Package | NuGet | Minimum OS Version |
| ----------------- | ----------------------------------- | -------------------------------------- |--------------------|
| Windows | VideoLAN.LibVLC.Windows | | Windows XP |
| UWP | VideoLAN.LibVLC.UWP |
| Windows 10 |
| Mac | VideoLAN.LibVLC.Mac |
| macOS 10.7 |
| Android | VideoLAN.LibVLC.Android |
| Android 2.3 |
| iOS | VideoLAN.LibVLC.iOS |
| iOS 8.4 |
| tvOS | VideoLAN.LibVLC.tvOS | ![LibVLCtvOSBadge] | tvOS 10.2 |
| Linux | Linux guide | N/A | N/A |
dotnet add package VideoLAN.LibVLC.[Windows|UWP|Android|iOS|Mac|tvOS]
- Install LibVLCSharp or LibVLCSharp.Forms (if you plan on using Xamarin.Forms)
LibVLCSharp is the .NET wrapper that consumes LibVLC and allows you to interact with native code from C#/F#.
| Platform | LibVLCSharp Package | NuGet | | ----------------- | ----------------------------------------------- | ------------------------------------------------- | | .NET Standard | LibVLCSharp | [![LibVLCSharpBadge]][LibVLCSharp] | | Xamarin.Android | LibVLCSharp | [![LibVLCSharpBadge]][LibVLCSharp] | | Xamarin.iOS | LibVLCSharp | [![LibVLCSharpBadge]][LibVLCSharp] | | Xamarin.tvOS | LibVLCSharp | [![LibVLCSharpBadge]][LibVLCSharp] | | Xamarin.Mac | LibVLCSharp | [![LibVLCSharpBadge]][LibVLCSharp] | | UWP | LibVLCSharp | [![LibVLCSharpBadge]][LibVLCSharp] | | Xamarin.Forms | LibVLCSharp.Forms | [![LibVLCSharpFormsBadge]][LibVLCSharpForms] | | MAUI | LibVLCSharp.MAUI | [![LibVLCSharpMAUIBadge]][LibVLCSharpMAUI] | | WPF | LibVLCSharp.WPF | [![LibVLCSharpWPFBadge]][LibVLCSharpWPF] | | Xamarin.Forms.WPF | LibVLCSharp.Forms.WPF | [![LibVLCSharpFormsWPFBadge]][LibVLCSharpFormsWPF]| | GTK | LibVLCSharp.GTK | [![LibVLCSharpGTKBadge]][LibVLCSharpGTK] | | Xamarin.Forms.GTK | LibVLCSharp.Forms.GTK | [![LibVLCSharpFormsGTKBadge]][LibVLCSharpFormsGTK]| | Windows Forms | LibVLCSharp.WinForms | [![LibVLCSharpWinFormsBadge]][LibVLCSharpWinForms]| | Uno Platform | LibVLCSharp.Uno | [![LibVLCSharpUnoBadge]][LibVLCSharpUno] | | Avalonia | LibVLCSharp.Avalonia | [![LibVLCSharpAvaloniaBadge]][LibVLCSharpAvalonia]| | Eto.Forms | LibVLCSharp.Eto | [![LibVLCSharpEtoBadge]][LibVLCSharpEto] | | Unity3D - Windows | [VLC for Unity (Windows)][VLCUnityStore] | [![VLCUnityBadge]][VLCUnityStore] | | Unity3D - UWP | [VLC for Unity (UWP)][VLCUnityStore] | [![VLCUnityBadge]][VLCUnityStore] | | Unity3D - Android | [VLC for Unity (Android)][VLCUnityStore] | [![VLCUnityBadge]][VLCUnityStore] | | Unity3D - iOS | [VLC for Unity (iOS)][VLCUnityStore] | [![VLCUnityBadge]][VLCUnityStore] | | Unity3D - macOS | [VLC for Unity (macOS)][VLCUnityStore] | [![VLCUnityBadge]][VLCUnityStore] |
Pre-release versions
LibVLCSharp 4 preview and LibVLC 4 nightly builds are distributed using https://feedz.io/ for now. To pull pre-release versions into your project, use the following NuGet.config file:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="videolan-preview" value="https://f.feedz.io/videolan/preview/nuget/index.json" />
</packageSources>
</configuration>
See the docs for preview builds installation details.
