Goal

LibVLCSharp's goal is to support all .NET runtimes (Xamarin/Mono, .NET Core and .NET Framework) on most operating systems by targeting .NET Standard 2.0.

We also aim to provide you with a custom video control integrated with the OS native UI toolkit. That means integration with UWP, Cocoa (Xamarin.Mac), GTK# and game engines with Mono support (Unity, Unreal, Godot). For a current status, see Supported platforms and Roadmap.

libvlc is a complete, opensource and crossplatform multimedia framework written in C. On the other hand, Xamarin allows true crossplatform .NET code on all platforms and provides an efficient way to build crossplatform UIs with Xamarin.Forms.

LibVLCSharp is designed to be the connecting layer in between libvlc and Xamarin.

Using LibVLCSharp means you can take advantage of all libvlc features from shared managed code (C#/F#), in a true crossplatform way. You may use the features described below on all supported platforms by LibVLCSharp (Android, iOS, XForms for now, more coming soon).

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:

Network browsing for distant filesystems (SMB, FTP, SFTP, NFS...).

HDMI passthrough for Audio HD codecs, like E-AC3, TrueHD or DTS-HD.

Stream to distant renderers, like Chromecast.

360 video and 3D audio playback with viewpoint change.

Support for Ambisonics audio and more than 8 audio channels.

Subtitles size modification live.

Hardware decoding and display on all platforms.

DVD playback and menu navigation.

Most things you can achieve with the regular VLC desktop app, you can also achieve using libvlc.

Supported platforms

Xamarin.Android

Xamarin.iOS

Xamarin.Forms

Installation

You need to install 2 packages to get started.

The first is libvlc, which is the actual VLC engine written mostly in C/C++ and compiled for your target platform. You can find information about it and how to download it on NuGet here.

The second package you need is LibVLCSharp, the .NET wrapper that consumes libvlc and allows you to interact with native code from C#/F#.

Getting started

Feel free to check out the native sample projects for iOS and Android to get started.

Basically, you need to instantiate a VideoView and add it to your View. It handles the required libvlc initialization for you on each platform, and offers a MediaPlayer .NET object on which you can call Play, Pause, set a new media or listen for libvlc events.

For usage of the API, you should check out the libvlcC API documentation which this wrapper follows closely.

Regarding LibVLCSharp.Forms, check out the sample for Forms to get started. Notably, make sure to call LibVLCSharpFormsRenderer.Init() in your platform specific project beforeXamarin.Forms.Forms.Init is called.

Quick API overview

VideoView.cs: Custom view which holds a LibVLC object and a MediaPlayer object.

LibVLC.cs: Main object pointing to a native libvlc instance in native code. Accessible from VideoView.