Error creating Media from MediaList
Summary
The constructor of Media throws an error when called with a media list.
In my case I wanted to use ":sout=#gather:transcode:std" pipeline to performe video concatenation.
Note that libVLCSharp works fine for me for a simple mediaPlayer.Play(media);
I tried both x86 and x64 builds. When checking with Dependency walker the underlying native function libvlc_media_list_media is present in the libvlc.dll
Or eventualy this is not the way to go for #gather
Minimal project and steps to reproduce
- Create new console .Net Framework application
- Add nugets : LibVLCSharp v3.0.2 June 12 VideoLAN.LibVLC.Windows v3.0.7 June 10
- Add following code to the Main:
Core.Initialize();
using (var libvlc = new LibVLC())
using (var mediaPlayer = new MediaPlayer(libvlc))
{
libvlc.SetLogFile("vlc.log");
Media media1 = new Media(libvlc, @"C:\Temp\SampleVideo.mp4");
Media media2 = new Media(libvlc, @"C:\Temp\SampleVideo.mp4");
MediaList list = new MediaList(libvlc);
list.AddMedia(media1);
list.AddMedia(media2);
Media mediaList = new Media(list); //<-- Unhandled exception here
...
}
- When running the following exception is thrown:
Failed to perform instanciation on the native side. Make sure you installed the correct VideoLAN.LibVLC.[YourPlatform] package in your platform specific project
What is the current bug behavior?
An unhandled exception is thrown.
What is the expected correct behavior?
MediaList playing or at least no exception thrown.
Relevant logs and/or screenshots
The resulting vlc.log is empty.
Environment
- OS: Windows
- Version 10 x64
- Device: DELL Latitude 5591 Core i5-8400H 16Gb
- LibVLC version and architecture 3.0.7
- LibVLCSharp version 3.0.2