【问题标题】:Passing in a playlist file to LibVLCSharp?将播放列表文件传递给 LibVLCSharp?
【发布时间】:2020-11-30 02:45:34
【问题描述】:

是否可以将播放列表文件传入 LibVLCSharp?我已经尝试了 .pls 文件和 .m3u8 文件,并为它们提供了一个网络服务器,但没有成功。

我是这样创建媒体的:

media = new Media(_libLVC, new Uri("http://192.168.1.100/test.m3u8"));

test.m3u8的内容:

#EXTM3U
http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4

查看调试日志,我可以看到它将其解释为播放列表:

11-29 12:39:09.430 D/Mono    ( 5328): DllImport searching in: 'libvlc' ('libvlc.so').
11-29 12:39:09.430 D/Mono    ( 5328): Searching for 'libvlc_media_release'.
11-29 12:39:09.430 D/Mono    ( 5328): Probing 'libvlc_media_release'.
11-29 12:39:09.430 D/VLC     ( 5328): [ec1e1d50/14ea] libvlc stream: using access module "access"
11-29 12:39:09.430 D/VLC     ( 5328): [ec1e1df0/14ea] libvlc stream: looking for stream_filter module matching "prefetch,cache_block": 26 candidates
11-29 12:39:09.430 D/Mono    ( 5328): Found as 'libvlc_media_release'.
11-29 12:39:09.432 D/VLC     ( 5328): [ec1e1df0/14ea] libvlc stream: using 90 bytes buffer, 90 bytes read
11-29 12:39:09.432 D/VLC     ( 5328): [ec1e1df0/14ea] libvlc stream: using stream_filter module "prefetch"
11-29 12:39:09.433 D/VLC     ( 5328): [ec1e1e90/14ea] libvlc stream: looking for stream_filter module matching "any": 26 candidates
11-29 12:39:09.433 D/VLC     ( 5328): [ec1e1df0/14ec] libvlc stream: end of stream
11-29 12:39:09.434 D/VLC     ( 5328): [ec1e1e90/14ea] libvlc stream: found valid M3U playlist
11-29 12:39:09.434 D/VLC     ( 5328): [ec1e1e90/14ea] libvlc stream: using stream_filter module "playlist"
11-29 12:39:09.434 D/VLC     ( 5328): [ec1e1e90/14ea] libvlc stream: stream filter added to 0xec1e1df0
11-29 12:39:09.437 D/VLC     ( 5328): [ec1e1f30/14ea] libvlc stream: looking for stream_filter module matching "any": 26 candidates
11-29 12:39:09.438 D/VLC     ( 5328): [ec1e1f30/14ea] libvlc stream: no stream_filter modules matched
11-29 12:39:09.438 D/VLC     ( 5328): [ec191fb0/14ea] libvlc stream_directory: looking for stream_directory module matching "any": 1 candidates
11-29 12:39:09.438 D/VLC     ( 5328): [ec191fb0/14ea] libvlc stream_directory: no stream_directory modules matched
11-29 12:39:09.438 D/VLC     ( 5328): [ec1e1c10/14ea] libvlc input source: attachment of directory-extractor failed for http://192.168.1.100/test.m3u8
11-29 12:39:09.438 D/VLC     ( 5328): [ec1e1f30/14ea] libvlc stream: looking for stream_filter module matching "record": 26 candidates
11-29 12:39:09.438 D/VLC     ( 5328): [ec1e1f30/14ea] libvlc stream: using stream_filter module "record"
11-29 12:39:09.438 D/VLC     ( 5328): [ec1e1c10/14ea] libvlc input source: creating demux: access='http' demux='any' location='192.168.1.100/test.m3u8' file='(null)'
11-29 12:39:09.440 D/VLC     ( 5328): [ec1e1fd0/14ea] libvlc demux: looking for demux module matching "any": 47 candidates
11-29 12:39:09.440 D/VLC     ( 5328): [ec1e1fd0/14ea] libvlc demux: cannot peek
11-29 12:39:09.440 I/chatty  ( 5328): uid=10069(com.companyname.playlistissue) config_GetGener identical 3 lines
11-29 12:39:09.441 D/VLC     ( 5328): [ec1e1fd0/14ea] libvlc demux: cannot peek
11-29 12:39:09.441 D/VLC     ( 5328): [ec1e1fd0/14ea] libvlc demux: using demux module "directory"
11-29 12:39:09.441 D/VLC     ( 5328): [ec1847b0/14ea] libvlc demux meta: looking for meta reader module matching "any": 2 candidates
11-29 12:39:09.446 D/VLC     ( 5328): [ec1847b0/14ea] libvlc demux meta: Trying Lua scripts in /data/user/0/com.companyname.playlistissue/files/.share/lua/meta/reader
11-29 12:39:09.446 D/VLC     ( 5328): [ec1847b0/14ea] libvlc demux meta: Trying Lua scripts in /data/app/com.companyname.playlistissue-4psrEdfCR_33zAzGGCIW_w==/lib/x86/vlc/lua/meta/reader
11-29 12:39:09.446 D/VLC     ( 5328): [ec1847b0/14ea] libvlc demux meta: Trying Lua scripts in /data/app/com.companyname.playlistissue-4psrEdfCR_33zAzGGCIW_w==/share/vlc/lua/meta/reader
11-29 12:39:09.446 D/VLC     ( 5328): [ec1847b0/14ea] libvlc demux meta: no meta reader modules matched
11-29 12:39:09.447 D/VLC     ( 5328): [d246b830/14ea] libvlc input: `http://192.168.1.100/test.m3u8' successfully opened
11-29 12:39:09.449 D/VLC     ( 5328): [d246b830/14ea] libvlc input: EOF reached
11-29 12:39:09.450 D/VLC     ( 5328): [ec1e1fd0/14ea] libvlc demux: removing module "directory"
11-29 12:39:09.450 D/VLC     ( 5328): [ec1e1f30/14ea] libvlc stream: removing module "record"
11-29 12:39:09.450 D/VLC     ( 5328): [ec1e1e90/14ea] libvlc stream: removing module "playlist"
11-29 12:39:09.450 D/VLC     ( 5328): [ec1e1df0/14ea] libvlc stream: removing module "prefetch"
11-29 12:39:09.455 D/VLC     ( 5328): [ec1e1d50/14ea] libvlc stream: removing module "access"

通过转到“打开网络流”并将其指向相同的 URL(“http://192.168.1.100/test.m3u8”),我可以在 Windows 的 VLC 应用程序中成功打开播放列表。

这是 libvlcsharp 中的错误还是我使用 API 不正确?

【问题讨论】:

    标签: libvlc libvlcsharp


    【解决方案1】:

    不,不支持。

    有用于播放列表的 MediaListPlayer API,但有人建议我不要使用它,因此,现在最好先解析文件并单独播放每个文件。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-05-16
      • 2014-05-08
      • 1970-01-01
      相关资源
      最近更新 更多