用于直播的 .m3u8 文件中应该有多少个 .ts 文件?
对于 Http Live 流媒体,最初我已将 3 个 .ts 文件添加到开始播放的 .m3u8 文件中。我应该以什么方式将传入的 .ts 文件附加到 .m3u8 文件中?
我要继续追加吗?
我应该用新文件替换旧文件吗?如果是这样,新的一组文件的顺序是什么?
For Http Live streaming, initially I have added 3 .ts files in to .m3u8 file it starts playing. In what ways should I append the incoming .ts file into .m3u8 file?
Shall I keep appending?
Shall I replace the older files with new one? If so in what order like, new set of files?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我见过的最好的方法是你决定你想要的“历史”量,例如 H = 20 个文件,然后发布播放列表中的最后 X 个文件(如果每个片段为 10 秒,则 3 个文件是个好主意)。
首先发布 movie_000、movie_001 和 movie_002。
10 秒后您发布 movie_001、movie_002 和 movie_003
...
依此类推,直到达到您希望拥有的文件数量,然后重写旧文件(这样您的硬盘驱动器就不会溢出数据)
所以 H 文件 X 10 秒后,你将拥有 movie_018、movie_019、movie_000
The best method I've seen is where you decide on the amount of "history" you want, for example H = 20 files, and then publish on the last X files in the playlist (if each segment is 10 seconds, then 3 files is a good idea).
you start by publishing movie_000, movie_001, and movie_002.
after 10 seconds you publish movie_001, and movie_002 and movie_003
...
and so on until you reach the amount of files you wish to have and then you rewrite older files (this way your hard drive doesn't overflow with data)
so after H files X 10 seconds, you will have movie_018, movie_019, movie_000