如何将图像添加到 m3u8 播放列表条目?

如何将图像添加到 m3u8 播放列表条目?

我正在组装一个电视直播流的 m3u8 播放列表。流本身是网络上的 m3u8 文件。我想在播放列表的条目中添加图标。不幸的是,我没有成功,因为 VLC 播放器不显示任何图标图像。

播放列表文件主要如下所示:

#EXTM3U
#EXTINF:-1,Channel Name 1
#EXTIMG: https://channel1.example.com/logo.png
https://channel1.example.com/master.m3u8
#EXTINF:-1,Channel Name 2
#EXTIMG: https://channel2.example.com/favicon.ico
https://channel2.example.com/master.m3u8
#EXTINF:-1,Channel Name 3
#EXTIMG: https://channel3.example.com/logo.png
https://channel3.example.com/index.m3u8

我认为问题在于图标图像位于网络上。所以我下载了其中一个,并使用本地绝对路径指向 m3u8 文件中的图像。据我所知,这并没有改变任何东西。

是因为播放列表的结构是 m3u8 文件内的 m3u8 文件(一般来说应该没问题,至少其他人也这样做)?还是因为嵌套的 m3u8 文件由几个部分组成,而图像应该在嵌套的 m3u8 中声明(这超出了我的控制范围)?另一个潜在原因可能是 VLC 只能处理播放列表的特定图像文件格式。到目前为止,我只尝试了*.ico*.png

我如何声明播放列表条目的图像?

答案1

某些应用程序可能无法识别#EXTIMG

#EXTM3U
#EXTINF:-1 tvg-logo="https://channel1.example.com/logo.png",Channel Name 1
https://channel1.example.com/master.m3u8
#EXTINF:-1 tvg-logo="https://channel2.example.com/favicon.ico",Channel Name 2
https://channel2.example.com/master.m3u8
#EXTINF:-1 tvg-logo="https://channel3.example.com/logo.png",Channel Name 3
https://channel3.example.com/index.m3u8

我们不使用 #EXTIMG 标签,而是使用 tvg-logo 属性

相关内容