我现在创建 vlc 播放列表 xspf 文件,我想使用 Libvlcsharp 代码流式传输它,如下所示。此代码适用于视频文件但 .xspf 文件没有响应
代码 :
LibVLCSharp.Shared.LibVLC _libVLC; 媒体播放器_mp;
_libVLC = new LibVLCSharp.Shared.LibVLC("-I", "null");
_mp = new MediaPlayer(_libVLC);
string xspf_file = @"D:\sample.xspf";
var media1 = new Media(_libVLC,xspf_file,FromType.FromPath);
media1.AddOption(":sout=#transcode{acodec=mp4a,ab=128,channels=2,samplerate=44100,scodec=none}:udp{dst=224.2.2.26:2226,mux=ts}");
_mp.Play(media1);
MessageBox.Show("play success");