首页 > c# > 在Windows 7上运行LibVLC.NET示例

在Windows 7上运行LibVLC.NET示例 (Running LibVLC.NET Example on Windows 7)

2019-04-14 c#.netdllvlc

问题

我想试试.Net C#的VLC媒体框架绑定。

我从http://libvlcnet.codeplex.com/SourceControl/latest下载源代码,解压缩,从http://www.videolan.org/vlc/下载最新的VLC ,将其安装到C:\ Program Files \。然后我打开下载的源项目,构建它,毕竟我尝试启动D:\ libvlcnet-20526 \ trunk \ Tests \ Tutorial \ bin \ Debug \ Tutorial.exe,最后出现错误:

 Unhandled exception:  System dll not found exception no valid libvlc.dll could br found VLC is probably not installed!
 at LibVlc.Net.LibVlcLibrary.getorloadlibrary(String libVLCLibrary)

我转到C:\ Program Files \ VideoLAN \ VLC并复制“libvlccore.dll”,“libvlc.dll”和“plugins”文件夹(http://libvlcnet.codeplex.com/中的 instruciotns ),然后将这些文件粘贴到D:\ libvlcnet-20526 \ trunk \ Tests \ Tutorial \ bin \ Debug \,在同一目录下创建“VLC”文件夹并粘贴dll,之后我复制了“VLC”文件夹并粘贴在每个上层文件夹中确定这个应用程序可以看到dll(我猜你已经注意到冗余:))。我对“VLC”文件夹的内容做了同样的事情,但仍然得到相同的错误。我想我做了http://libvlcnet.codeplex.com/建议我做的所有事情,但我仍未能启动该项目。

我错了什么?


初始化库时,我提供了VLC的路径:

 LibVLCLibrary library = LibVLCLibrary.Load("C:\\Program Files\\VideoLAN\\VLC");

我目前安装了2.0.0 VLC,所需版本为1.2,但官方ftp没有该版本http://download.videolan.org/pub/videolan/vlc/这次我又收到了另一个错误“程序入口指向aout_ismuted coul不在动态链接库liblccore.dll中“。我也尝试过VLC 1.1.2,但仍然无法启动。

解决方法

更好的是github 上的vlc.DotNet,它仍然在2019年4月更新:

https://github.com/ZeBobo5/Vlc.DotNet/wiki/Using-Vlc.DotNet-in-WinForms

我让它在5分钟内从头开始工作。

问题

I want to try out VLC media framework bindings for .Net C#.

I download source from http://libvlcnet.codeplex.com/SourceControl/latest , unzip it, download latest VLC from http://www.videolan.org/vlc/ , install it to C:\Program Files\ . Then I open downloaded source project, build it and after all I try to launch D:\libvlcnet-20526\trunk\Tests\Tutorial\bin\Debug\Tutorial.exe and finally error is trown :

 Unhandled exception:  System dll not found exception no valid libvlc.dll could br found VLC is probably not installed!
 at LibVlc.Net.LibVlcLibrary.getorloadlibrary(String libVLCLibrary)

I go to C:\Program Files\VideoLAN\VLC and copy "libvlccore.dll", "libvlc.dll" and "plugins" folder (instruciotns in http://libvlcnet.codeplex.com/ ), then paste these files to D:\libvlcnet-20526\trunk\Tests\Tutorial\bin\Debug\ , in the same directory I create "VLC" folder and paste dll's, after doing that I copied "VLC" folder and pasted in every upper folder just to be sure that this application could see dlls (I guess you already noticed redundacy :) ). I do the same thing with the contents of that "VLC" folder and still get the same error. I think I did everything what http://libvlcnet.codeplex.com/ suggested me to do and still I failed to launch that project.

What did I wrong?


When initializing library I provided path to VLC:

 LibVLCLibrary library = LibVLCLibrary.Load("C:\\Program Files\\VideoLAN\\VLC");

I currently have 2.0.0 VLC installed and required version is 1.2 ,however official ftp doesn't have that version http://download.videolan.org/pub/videolan/vlc/ and this time I get yet another error "Procedure entry point aout_ismuted coul not be located in the dynamic link library liblccore.dll". I also tried VLC 1.1.2, but it still fails to launch.

解决方法

An even better yet is vlc.DotNet on github and it is still updated as of April 2019:

https://github.com/ZeBobo5/Vlc.DotNet/wiki/Using-Vlc.DotNet-in-WinForms

I got it working from scratch in 5 minutes.

相似信息