开发者

How many .ts files should be there in .m3u8 file for Live streaming?

开发者 https://www.devze.com 2023-02-18 09:01 出处:网络
For Http Live streaming, initially I have added 3开发者_JAVA百科 .ts files in to .m3u8 file it starts playing. In what ways should I append the incoming .ts file into .m3u8 file?

For Http Live streaming, initially I have added 3开发者_JAVA百科 .ts files in to .m3u8 file it starts playing. In what ways should I append the incoming .ts file into .m3u8 file?

  1. Shall I keep appending?

  2. Shall I replace the older files with new one? If so in what order like, new set of files?


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号