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.
You can use
Meta.VLC
. It has a control for WPF.It's the github link: https://github.com/higankanshi/Meta.Vlc You can find it on nuget: https://www.nuget.org/packages/Meta.Vlc.Wpf/
Also if you want a WinForm control, use
VLC.NET
: github: https://github.com/ZeBobo5/Vlc.DotNet nuget: https://www.nuget.org/packages/Vlc.DotNet.Forms/I've download the
libvlcnet-20526.zip
source code from http://libvlcnet.codeplex.com/ Tried to run it - does not find VLC libraries. I tried diagnosing first.I've had VLC installed, it had libvlc 2.1.2. The example app scanned this and detected it as not supported. Uh-oh.
I've uninstalled VLC, then installed the newest one. It's got libvlc 3.0. Of course, it's not accepted either.
The description at the main page of the LibVLCNet project says that it needs libvlc 1.2.x. I've failed to find that one just as you. Bad luck.
Then it occurred to me. LibVlc is quite .. well written. Have it really changed so much?
I went to libvlcnet's code, file
libVlcLibrary.cs, line 162
and saw there:I commented that out and debugged through the code. All exports were found and loaded. Of course, that's just exports. Their parameters could have changed.
but, after commenting that out - the example application run and loaded a WMV video and successfully played it!
There are some bugs due to the incorrect version - for example, "Next Frame" button crashes the app, probaly the underlying function has changed between the versions. But - basic playback works, and all exports were found - so the LibVLCNet library it should be patchable, not only to 2.x but also 3.x libvlc versions.
I found another .NET C# library, which has some working examples http://sourceforge.net/projects/libvlcnet/