HTTP Live Streaming iOS 不刷新索引 .m3u8 文件

发布于 2024-12-17 08:29:43 字数 846 浏览 5 评论 0原文

我在 StackOverflow 上搜索了所有类似的问题,但没有找到可以回答我的问题的答案。

我正在尝试将一些电影从我的 Linux 计算机 (openSuSE 12.1) 流式传输到我的 iPad。我用 ffmpeg 转换它们,用我自己的分段器对它们进行分段,将它们放在我的 apache2 服务器的 www 文件夹中,并放在 .m3u8 播放列表中。到这里-一切都好!

我开始播放电影(带有标签的 HTML 页面),它播放得很好,但只有前五个片段,这些片段已随播放列表的第一次加载而加载。 HTML 页面(浏览器或播放器 - 不知道)不会从服务器刷新(重新下载)播放列表。这是我的 .m3u8 播放列表文件的样子:

#EXTM3U
#EXT-X-MEDIA-SEQUENCE:19
#EXT-X-TARGETDURATION:8

#EXTINF:8,
http://192.168.1.4/segment_19.ts
#EXTINF:8,
http://192.168.1.4/segment_20.ts
#EXTINF:8,
http://192.168.1.4/segment_21.ts
#EXTINF:8,
http://192.168.1.4/segment_22.ts
#EXTINF:8,
http://192.168.1.4/segment_23.ts

片段与播放列表文件位于同一文件夹中,片段编码正确(因为我至少可以看到前五个:D)。我还从 apache 服务器观察 access_log,我看到播放列表的第一次加载,然后是所有 5 个片段的后续加载,直到那里为止。它甚至不会尝试进一步刷新 m3u8 文件。

如果重要的话 - iOS 5.0、iPad 2、仅限 Wi-Fi 版本,而不是越狱的

Ideas?我做错了什么?

I searched all similar questions on StackOverflow, but found none to answer my problem.

I am trying to stream some movies from my Linux computer (openSuSE 12.1) to my iPad. I convert them with ffmpeg, segment them with my own segmenter, place them in the www folder of my apache2 server and also place inside the .m3u8 playlist. Til here - all is ok!

I start playing the movie (HTML page with tag) and it plays nicely, but only the first five segments, which have been loaded with the first load of the playlist. The HTML page (the browser, or the player - no idea) does not refresh (re-download) the playlist from the server. Here is what my .m3u8 playlist file looks like:

#EXTM3U
#EXT-X-MEDIA-SEQUENCE:19
#EXT-X-TARGETDURATION:8

#EXTINF:8,
http://192.168.1.4/segment_19.ts
#EXTINF:8,
http://192.168.1.4/segment_20.ts
#EXTINF:8,
http://192.168.1.4/segment_21.ts
#EXTINF:8,
http://192.168.1.4/segment_22.ts
#EXTINF:8,
http://192.168.1.4/segment_23.ts

Segments are in the same folder as the playlist file, segments are correctly encoded (because I can see at least the first five ones :D). I also watch the access_log from the apache server and I see the first load of the playlist, then the consequent load of all 5 segments and it stops till there. It doesn't even try to further refresh the m3u8 file.

If it matters - iOS 5.0, iPad 2, Wi-Fi version only, not jailbroken

Ideas? What am I doing wrong?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

素罗衫 2024-12-24 08:29:43

播放器(平台)将自动更新m3u8文件。
ios 和 android 中不需要 http Expires 设置。
可以查看httpserver的访问日志。

player(platform) will update m3u8 file automatic.
Not need http Expires setting in ios and android.
you can view access log of httpserver.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文