Home

Awesome

<h3 align="center"> <img src="src/assets/banner.png"/> </h3>

LibVLCSharp

Build Status Join the chat at https://discord.gg/3h3K3JF LibVLCSharp API Docs

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

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:

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.

Installation

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

PlatformLibVLC PackageNuGetMinimum OS Version
WindowsVideoLAN.LibVLC.WindowsLibVLCWindowsBadgeWindows XP
UWPVideoLAN.LibVLC.UWPLibVLCWin10BadgeWindows 10
MacVideoLAN.LibVLC.MacLibVLCMacBadgemacOS 10.7
AndroidVideoLAN.LibVLC.AndroidLibVLCAndroidBadgeAndroid 2.3
iOSVideoLAN.LibVLC.iOSLibVLCiOSBadgeiOS 8.4
tvOSVideoLAN.LibVLC.tvOSLibVLCtvOSBadgetvOS 10.2
LinuxLinux guideN/AN/A
dotnet add package VideoLAN.LibVLC.[Windows|UWP|Android|iOS|Mac|tvOS]
  1. 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#.

PlatformLibVLCSharp PackageNuGet
.NET StandardLibVLCSharpLibVLCSharpBadge
Xamarin.AndroidLibVLCSharpLibVLCSharpBadge
Xamarin.iOSLibVLCSharpLibVLCSharpBadge
Xamarin.tvOSLibVLCSharpLibVLCSharpBadge
Xamarin.MacLibVLCSharpLibVLCSharpBadge
UWPLibVLCSharpLibVLCSharpBadge
Xamarin.FormsLibVLCSharp.FormsLibVLCSharpFormsBadge
MAUILibVLCSharp.MAUILibVLCSharpMAUIBadge
WPFLibVLCSharp.WPFLibVLCSharpWPFBadge
Xamarin.Forms.WPFLibVLCSharp.Forms.WPFLibVLCSharpFormsWPFBadge
GTKLibVLCSharp.GTKLibVLCSharpGTKBadge
Xamarin.Forms.GTKLibVLCSharp.Forms.GTKLibVLCSharpFormsGTKBadge
Windows FormsLibVLCSharp.WinFormsLibVLCSharpWinFormsBadge
Uno PlatformLibVLCSharp.UnoLibVLCSharpUnoBadge
AvaloniaLibVLCSharp.AvaloniaLibVLCSharpAvaloniaBadge
Eto.FormsLibVLCSharp.EtoLibVLCSharpEtoBadge
Unity3D - WindowsVLC for Unity (Windows)VLCUnityBadge
Unity3D - UWPVLC for Unity (UWP)VLCUnityBadge
Unity3D - AndroidVLC for Unity (Android)VLCUnityBadge
Unity3D - iOSVLC for Unity (iOS)VLCUnityBadge
Unity3D - macOSVLC for Unity (macOS)VLCUnityBadge

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.

Getting started

Follow the Getting started guide. Make sure you read it since it contains platform-specific caveats

Documentation

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:

Best practices

This document details how to use LibVLCSharp in a correct way, notably taking into consideration the native interop part.

Q&A guide

This is a Q&A document which I compiled from all the questions I got asked regarding LibVLC and LibVLCSharp. Continuously updated.

Troubleshooting issues

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.

Libvlc specific information

This page focuses on the core native library and contains information regarding advanced libvlc configuration and its versioning strategy by VideoLAN.

Tutorials

This page indexes all available tutorial materials about LibVLCSharp. There are currently videos, talks, blogposts and code samples.

Community projects

Here we list several interesting projects made by the community using LibVLCSharp. Feel free to send a PR to yours!

Ebook

In September 2022, the first book ever about LibVLC, the VideoLAN community and LibVLCSharp was released!

The Good Parts of LibVLC contains everything you need to know about VLC, LibVLC and how to use it from .NET with LibVLCSharp.

Samples

For more advanced samples, have a look at libvlcsharp-samples with apps such as:

Feel free to suggest and contribute new samples.

Quick API overview

using var libvlc = new LibVLC(enableDebugLogs: true);
using var media = new Media(libvlc, new Uri(@"C:\tmp\big_buck_bunny.mp4"));
using var mediaplayer = new MediaPlayer(media);

mediaplayer.Play();

Console.ReadKey();

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

Roadmap

If you have a request or question regarding the roadmap, feel free to open an issue (using an issue template) or PR.

Versioning

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.

Release Notes

Check out the NEWS file for details about each release.

Contribute

Pull request

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.

Gitlab issues

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.

There are up for grabs tickets as well if you would like to start contributing.

Questions and Support

Bug trackers

You have encountered an issue and wish to report it to the VLC dev team?

You can create one on our Gitlab (using an issue template) for .NET related questions/problems.

For LibVLC/VLC specific issues, usually native code, please go to the bug tracker of the VLC project.

Before creating an issue or ticket, please double check for duplicates!

Discord

We are on Join the chat at https://discord.gg/3h3K3JF

StackOverflow

We regularly monitor the libvlcsharp tag on stackoverflow

Forum

If you have any question or if you're not sure it's actually an issue, please visit our forum.

Commercial services

If you would like VLC developers to provide you with:

Feel free to contact us.

Code of Conduct

Please read and follow the VideoLAN CoC license.

Licenses

LibVLCSharp is released under the LGPLv2.1 and is also available under a commercial license.

<br/> <div align="center"> <a href="https://code.videolan.org/videolan/LibVLCSharp"><img src="src/assets/icon.png"/></a> </div>