README.md 6.25 KB
Newer Older
1
2
# Samples for [LibVLCSharp](https://code.videolan.org/videolan/LibVLCSharp)

Martin Finkel's avatar
Martin Finkel committed
3
[![Join the chat at https://discord.gg/3h3K3JF](https://img.shields.io/discord/716939396464508958?label=discord)](https://discord.gg/3h3K3JF)
Martin Finkel's avatar
Martin Finkel committed
4
[![Build Status](https://videolan.visualstudio.com/libvlcsharp-samples/_apis/build/status/mfkl.libvlcsharp-samples?branchName=master)](https://videolan.visualstudio.com/libvlcsharp-samples/_build/latest?definitionId=45&branchName=master)
Martin Finkel's avatar
Martin Finkel committed
5

6
7
8
Various samples on different platforms showcasing [LibVLCSharp](https://code.videolan.org/videolan/LibVLCSharp) features. 

:wave: If you need custom LibVLCSharp integration or advanced samples, feel free to [contact us](mailto:dotnet@videolabs.io). Commercial support is also [available](https://videolabs.io/#contact).
Martin Finkel's avatar
Martin Finkel committed
9

Martin Finkel's avatar
Martin Finkel committed
10
## [Chromecast sample](https://code.videolan.org/mfkl/libvlcsharp-samples/tree/master/Chromecast)
Martin Finkel's avatar
Martin Finkel committed
11

Martin Finkel's avatar
Martin Finkel committed
12
A sample demonstrating how to find and use a Chromecast in a crossplatform Xamarin.Forms app (iOS/Android). [Blog post](https://mfkl.github.io/chromecast/2018/10/21/High-performance-cross-platform-streaming-with-libvlc-and-Chromecast-on-.NET.html)
Martin Finkel's avatar
Martin Finkel committed
13

Martin Finkel's avatar
Martin Finkel committed
14
## [HLS sample](https://code.videolan.org/mfkl/libvlcsharp-samples/tree/master/RecordHLS)
Martin Finkel's avatar
Martin Finkel committed
15
16

A sample demonstrating how to record an HLS stream using LibVLCSharp in a .NET Core CLI Windows app. [Blog post](https://mfkl.github.io/hls/2018/10/10/How-to-record-HLS-stream-with-LibVLCSharp-and-.NET-Core.html)
Martin Finkel's avatar
Martin Finkel committed
17

Martin Finkel's avatar
Martin Finkel committed
18
19
## [RTSP Mosaic sample](https://code.videolan.org/mfkl/libvlcsharp-samples/tree/master/VideoMosaic)

Martin Finkel's avatar
Martin Finkel committed
20
21
<img src="https://mfkl.github.io/assets/mosaic-ios.png" Width="220" /> <img src="https://mfkl.github.io/assets/mosaic-android.png" Width="220" />

Martin Finkel's avatar
Martin Finkel committed
22
23
Short Xamarin.Forms sample demonstrating how to build a mosaic-style RTSP player (iOS/Android). [Blog post](https://mfkl.github.io/libvlc/rtsp/xamarin/forms/2018/12/05/crossplatform-RTSP-mosaic-views-with-libvlcsharp.html)

Martin Finkel's avatar
Martin Finkel committed
24
25
26
## [ForegroundBackground](https://code.videolan.org/mfkl/libvlcsharp-samples/tree/master/ForegroundBackground)

This sample demonstrates how to deal with video playback when the app goes in the background/foreground.
Martin Finkel's avatar
Martin Finkel committed
27
28
29
30
It shows one way to deal with this on Android with LibVLCSharp.Forms on Xamarin.Forms specifically, which is a bit trickier than other platforms.

## [PulseMusic](https://code.videolan.org/mfkl/libvlcsharp-samples/tree/master/PulseMusic)

Martin Finkel's avatar
Martin Finkel committed
31
32
<img src="https://mfkl.github.io/assets/pulse-music-concept.gif"/> <img src="https://mfkl.github.io/assets/pulse-music-playback.gif" Width="220" />

Martin Finkel's avatar
Martin Finkel committed
33
34
35
36
PulseMusic is an audio player sample showcasing use of Skia and LibVLCSharp to implement great UX player view. [Blog post](https://mfkl.github.io/libvlc/skia/xamarin/forms/ux/2018/12/31/PulseMusic-music-player-design.html)

## [LibVLCSharp.PHP](https://code.videolan.org/mfkl/libvlcsharp-samples/tree/master/LibVLCSharp.PHP)

37
38
39
40
A small experiment that shows how to use LibVLCSharp from PHP using the [PeachPie](https://www.peachpie.io/) compiler.

## [LibVLCSharp.VB](https://code.videolan.org/mfkl/libvlcsharp-samples/tree/master/LibVLCSharp.VB)

Martin Finkel's avatar
Martin Finkel committed
41
42
43
44
A VB.NET (Visual Basic) sample that uses LibVLCSharp.

## [Gestures](https://code.videolan.org/mfkl/libvlcsharp-samples/tree/master/Gestures/Gestures)

Martin Finkel's avatar
Martin Finkel committed
45
46
47
[![VLC 3.0 playing 8K 48fps 360 video on Android Galaxy S8](https://i.imgur.com/0B34Hjj.png)](https://player.vimeo.com/video/254723180 "VLC 3.0 playing 8K 48fps 360 video on Android Galaxy S8")

[VLC 3.0 playing 8K 48fps 360 video on Android Galaxy S8](https://player.vimeo.com/video/254723180)
Martin Finkel's avatar
Martin Finkel committed
48

Martin Finkel's avatar
Martin Finkel committed
49
50
51
52
2 cross-platform gestures samples showcasing how to use the Xamarin.Forms crossplatform gestures to control the video position, volume level and 360 viewpoint. [Blog post](https://mfkl.github.io/libvlc/360/xamarin/forms/ux/2019/02/12/Fun-with-crossplatform-gestures-and-360-videos.html)

## [LocalNetwork](https://code.videolan.org/mfkl/libvlcsharp-samples/tree/master/LocalNetwork)

Martin Finkel's avatar
Martin Finkel committed
53
![](localnetwork-record.mp4)
Martin Finkel's avatar
Martin Finkel committed
54

Martin Finkel's avatar
Martin Finkel committed
55
Xamarin.Forms sample showcasing local network browsing and playback of network shares (SMB, UPnP) on Android, iOS and WPF from 100% shared code. [Blog post](https://mfkl.github.io/libvlc/crossplatform/xamarin/forms/2019/07/02/Crossplatform-local-network-browsing-and-media-playback.html)
Martin Finkel's avatar
Martin Finkel committed
56
57
58

## [MediaPlayerElement](https://code.videolan.org/mfkl/libvlcsharp-samples/tree/master/MediaElement)

Martin Finkel's avatar
Martin Finkel committed
59
60
<img src="https://mfkl.github.io/assets/media-element-iphone.png"/>

Martin Finkel's avatar
Martin Finkel committed
61
62
63
64
Minimal Xamarin.Forms sample to get up and running quickly with the MediaPlayerElement from LibVLCSharp.Forms. [Blog post](https://mfkl.github.io/libvlc/crossplatform/xamarin/forms/2019/08/13/MediaPlayerElement-Plug-and-play-LibVLCSharp-UI-video-control.html)

## [Preview Thumbnailer](https://code.videolan.org/mfkl/libvlcsharp-samples/tree/master/PreviewThumbnailExtractor)

Martin Finkel's avatar
Martin Finkel committed
65
66
<img src="https://pbs.twimg.com/media/EMtC5TVUcAA2VMD?format=jpg&name=medium"/>

Martin Finkel's avatar
Martin Finkel committed
67
.NET Core crossplatform sample showing how to use the LibVLC 3 video callbacks API to extract frames and save them to disk with ImageSharp or Skia.
Martin Finkel's avatar
Martin Finkel committed
68
69
70

## [ScreenRecorder](https://code.videolan.org/mfkl/libvlcsharp-samples/tree/master/ScreenRecorder)

Martin Finkel's avatar
Martin Finkel committed
71
72
73
74
.NET Core crossplatform (Windows, macOS, Linux) console app that records your screen for 5 seconds and saves the video as an mp4 on disk.

## [LVST](https://github.com/mfkl/lvst)

75
76
.NET Core crossplatform (Windows, macOS, Linux) CLI app that allows you to stream any media torrent for local or remote (chromecast) playback. [Blog post](https://mfkl.github.io/libvlc/2020/03/23/Torrents-and-multimedia-streaming.html)

Martin Finkel's avatar
Martin Finkel committed
77
78
<img src="https://raw.githubusercontent.com/mfkl/lvst/master/lvst.gif"/>

79
80
81
82
83
## [AudioCallbacks](https://code.videolan.org/mfkl/libvlcsharp-samples/tree/master/AudioCallbacks)

This sample shows you how you can use `SetAudioFormatCallback` and `SetAudioCallbacks`. It does two things:

1. Play the sound from the specified video using [NAudio](https://github.com/naudio/NAudio)
84
85
2. Extract the sound into a file using [NAudio](https://github.com/naudio/NAudio)

Martin Finkel's avatar
Martin Finkel committed
86
87
88
89
90
## [Speech](https://code.videolan.org/mfkl/libvlcsharp-samples/tree/master/Speech)

Speak to your video player by integrating [System.Speech](https://docs.microsoft.com/en-us/dotnet/api/system.speech.recognition) with LibVLC in ~ 100 lines of code.

![](libvlc-speech.mp4)
91
92
---

93
For more samples, check out the [Community Projects](https://code.videolan.org/videolan/LibVLCSharp/-/blob/3.x/docs/made_with_libvlcsharp.md) made with LibVLCSharp.