Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

What is maximum number of segments with HLS

I'm trying to use the Roku like a DVR with a live stream. The idea is to keep one hour of video, for instance, so the viewer can watch live or any time within the hour before that.

My testing setup is the Kulabyte encoder streaming iOS HTTP segments to an apache server and then viewing the stream on both a Roku (N1000 2.8b1158) and an iPad. All devices are connected to the same router so there are no bandwidth issues. The stream itself is made up of 5 second segments with a count up to 720.

What I found is that during the first hour of streaming, the Roku would play live just fine and you could scrub backwards and play from there just fine as well. However, once the stream became longer than one hour (i.e. more than 720 segments), the Roku would no longer playing live but somewhere behind that. I'm not sure if this started right at 1 hour or a little later because I was not watching at the 1 hour threshold. The iPad on the other hand continued to play live from the encoder after an hour or I could scrub back on the iPad and then scrub back to live and it would be live.

If I look at the .m3u8 file put on the server by the encoder, after an hour it does only have 720 segments listed and they are the most recent as would be expected. Also, since the iPad was behaving as expected, I'm pretty sure the .m3u8 file is correct.

Any ideas why the Roku is not playing live after so many segment?

Regards,
Tim
0 Kudos
1 REPLY 1
RokuMarkn
Visitor

Re: What is maximum number of segments with HLS

How far behind live was the Roku playing after an hour? I'm not sure I understand exactly what you're describing -- if it started playing at live and then sometime later was behind live, did it pause or glitch somewhere during that time? I'm not sure how it could have dropped behind live without some interruption in playback. Is it possible there was a rebuffer which simply dropped it back a few seconds? Can you manually seek forward to the live point after it gets into this state?

Also note that no HLS player can play literally at the live point; this is disallowed by the HLS spec and would be a bad idea even if it weren't disallowed. The spec says playback should start no closer than 3 target durations to the live point.

--Mark
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.