I'm trying to use the Roku to play a live HLS stream. I start streaming, and then launch the player on roku (I'm using the simple video player example with my own local server put in). If I fast-forward to try to get closer to the end of the stream (so less delay between the video and the source), it will frequently lock up when I reach the end of the stream- the "Loading, Please Wait" screen stays up with the progress bar stuck around 1/3 progress. If I rewind, I can see stuff that I had already played, but can never go past the point where it stopped. Eventually, it will get unstuck and play again.
I have the web server showing requests live, and when this happens, the Roku stops requesting the m3u8 playlist or any .ts files (normally, it is fetching them every few seconds). Eventually after seeking through the stream a little, it "wakes up".
I'd ideally like to go right up to the end of the stream to minimize the delay from the live source.
I'm creating the files with ffmpeg to do the encoding and Apple's mediastreamsegmenter to do the HLS segmenting. I'm using 5 second segments, and keeping them all in the playlist (we need to be able to go back and play the content again if we want). There is no CDN- I'm serving the files directly off of my computer from the folder that mediastreamsegmenter is writing them to.
The command I'm using to generate the HLS files is: ffmpeg -re -i <input file> -c:a copy -c:v libx264 -b:v 900k -bsf:v h264_mp4toannexb -f mpegts - | mediastreamsegmenter -f /Volumes/web/stream -i out2.m3u8 -s 10000 -S 1 -t 5
I have a Roku 3 (4200X) with software version 5.6, build 60.
There aren't any error messages in the debug console (port 8085) The web server request logs look like:
Re: Issues with HLS streaming close to end of file
You could try setting playstart a little in the future before you start playing, this should push the start of play as close as the device will get to real time (which is still probably 15-30 seconds behind real time):