C#使用Vlc64位元播放器By Vlc.DotNet

C#使用Vlc64位元播放器By Vlc.DotNet

Vlc.DotNet is a .net library that hosts the audio/video capabilities of the VLC libraries. In other words, it’s a .net wrapper around libvlc.

Step1.先安裝vlc-3.0.8-win64.exe
Step2.Nuget安裝Vlc.DotNet

Step3.工具箱->COM元件->VlcControl

Step4.加入控制項,及加入以下範例程式:

1
2
3
4
5
6
private void vlcControl1_VlcLibDirectoryNeeded(object sender, Vlc.DotNet.Forms.VlcLibDirectoryNeededEventArgs e)
{
e.VlcLibDirectory = new DirectoryInfo(@"C:\Program Files\VideoLAN\VLC\");
}

vlcControl1.Play(new Uri("rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov"));

References:https://github.com/ZeBobo5/Vlc.DotNet