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
- Samples
- Quick API overview
- Roadmap
- Versioning
- Release Notes
- Contribute
- Communication
- Code of Conduct
- License
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
.
Full featured video control for Xamarin.Forms available in LibVLCSharp.Forms (iOS/Android) and Uno platform (iOS/Android/UWP).
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
- Uno Platform (UWP, Android, iOS)
- .NET Standard 1.1 and 2.0
- .NET Framework 4.0 and later
- .NET Core (including ASP.NET Core)
- Unity3D
- Windows Classic
- Install LibVLC in your platform specific project.
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 | tvOS 10.2 | |
Linux | Linux guide | N/A | N/A |
dotnet add package VideoLAN.LibVLC.[Windows|UWP|Android|iOS|Mac|tvOS]
LibVLC is the actual VLC engine written mostly in C/C++ and compiled for your target platform. More information here.
- Install LibVLCSharp or LibVLCSharp.Forms (if you plan on using Xamarin.Forms)
Platform | LibVLCSharp Package | NuGet |
---|---|---|
.NET Standard | LibVLCSharp | |
Xamarin.Android | LibVLCSharp | |
Xamarin.iOS | LibVLCSharp | |
Xamarin.tvOS | LibVLCSharp | |
Xamarin.Mac | LibVLCSharp | |
UWP | LibVLCSharp | |
Xamarin.Forms | LibVLCSharp.Forms | |
WPF | LibVLCSharp.WPF | |
Xamarin.Forms.WPF | LibVLCSharp.Forms.WPF | |
GTK | LibVLCSharp.GTK | |
Xamarin.Forms.GTK | LibVLCSharp.Forms.GTK | |
Windows Forms | LibVLCSharp.WinForms | |
Uno Platform | LibVLCSharp.Uno | |
Unity3D - Windows | VLC for Unity (Windows) |
LibVLCSharp is the .NET wrapper that consumes LibVLC
and allows you to interact with native code from C#/F#.
Follow the Getting started guide. Make sure you read it since it contains platform-specific caveats
Our Documentation is part of this repository.
Feel free to browse it and if you see something missing, you can improve it by sending a PR.
It includes helpful documents such as:
This document details how to use LibVLCSharp in a correct way, notably taking into consideration the native interop part.
This is a Q&A document which I compiled from all the questions I got asked regarding LibVLC and LibVLCSharp. Continously updated.
When you encounter an issue with LibVLC/LibVLCSharp, identifying the cause is not always straightforward. This document gives you clues on how to go about it.
This page focuses on the core native library and contains information regarding advanced libvlc configuration and its versioning strategy by VideoLAN.
This page indexes all available tutorial materials about LibVLCSharp. There are currently videos, talks, blogposts and code samples.
Here we list several interesting projects made by the community using LibVLCSharp. Feel free to send a PR to yours!
For more advanced samples, have a look at libvlcsharp-samples. It currently includes:
- Chromecast sample: Discover chromecasts on your local network and select one for playback in 100% shared code (Xamarin.Forms, iOS/Android).
- Record HLS sample: Simple .NET Core CLI app which shows how to record an HLS stream to the filesystem.
- RTSP Mosaic sample: Cross-platform RTSP player sample with 4 views mosaic (Xamarin.Forms, iOS/Android).
- PulseMusic UX sample: A stylish music player UX example using Skia on iOS and Android.
- Gestures sample: Cross-platform touch gestures and 360 videos on iOS and Android.
- LocalNetwork sample: Cross-platform local network browsing and playback with network shares (SMB, UPnP) on Android, iOS and WPF.
- MediaPlayerElement sample: Minimal iOS/Android sample showing how to get started with the crossplatform MediaPlayerElement control from LibVLCSharp.Forms.
- SkiaSharp Preview Thumbnailer sample: .NET Core sample app showing how to use LibVLC 3 video callbacks and encode the frame with SkiaSharp before saving it to disk.
Feel free to suggest and contribute new samples.
LibVLC.cs
: Main object pointing to a nativelibvlc
instance in native code.MediaPlayer.cs
: Manages playback, offers event listeners and more. Accessible fromVideoView
with data-binding support.Media.cs
: Class representing and providing information about a media such as a video or audio file or stream.VideoView.cs
: Custom native view which holds aMediaPlayer
object.MediaDiscoverer.cs
: This object should be used to find media on NAS and any SMB/UPnP-enabled device on your local network.RendererDiscoverer.cs
: Use this to find and use a Chromecast or other distant renderers.Dialog.cs
: Dialogs can be raised from thelibvlc
engine in some cases. Register callbacks with this object.
The LibVLCSharp.Forms and Uno packages features a MediaPlayerElement
control, similar to the ones provided by the .NET Framework on WPF and UWP. It currently supports iOS, Android and UWP (Uno only).
- Game engines (Unity, Unreal, Godot)
If you have a request or question regarding the roadmap, feel free to open an issue (using an issue template) or PR.
As this is a libvlc binding, we try to follow the libvlc versioning scheme as much as possible. The versioning strategy is explained in the versioning document.
Check out the NEWS file for details about each release.
Pull requests are more than welcome! If you do submit one, please make sure to read the contributing guidelines first, and use our pull request template.
You can look through issues we currently have on the VideoLAN Gitlab. Please pick one of our GitLab issue templates so we can assist you better.
If you have any question or if you're not sure it's actually an issue, please visit our forum.
You have encountered an issue and wish to report it to the VLC dev team?
You can create one on our Gitlab or on our bug tracker.
Before creating an issue or ticket, please double check for duplicates!
Want to quickly get in touch with us for a question, or even just to talk?
You will always find someone from the VLC team on IRC, #videolan channel on the freenode network.
If you don't have an IRC client, you can always use the freenode webchat.
We regularly monitor the libvlcsharp
tag on
Please read and follow the VideoLAN CoC license.
LibVLCSharp is under the LGPLv2.1.
Note: the .NET4.0 LibVLCSharp build references a nuget package that may indicate its license as the .NET Library license but it's actually opensource under MIT.