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: 
Hexamon
Newbie

Roku2 HLS video player occasionally skips segments

Roku2 player occasionally skips HLS segments during the playback. No errors are reported. It just skips them. It took me a while to create a reproducible test case and pinpoint the possible cause. I believe this has something to do with the way Roku2 handles pre-loading the HLS segments. Roku (previous player) does not exhibit the same problem. I have tried many different connenctions, different tools for encoding and segmenting, using the sample video files provided by Roku and the problem always remains.

Here is the test which reproduces the problem 9 out of 10 times. I have the necessary stream and the player code available for the troubleshooting team upon request.

Test setup
a) Craig Venter's TED video (the sample one form Roku2 docs) - HLS stream with 20 second segment *.ts files
b) The segments are marked with the frame number and the name of the segment file being played (this is not a Roku2 overlay, these are actually embedded in the *.ts files). This makes it much easier to identify the "skips" (although I have by now memorized Mr. Venture's presentation by heart :))
c) Roku2 simplevideoplayer sample code to play the HLS stream (the only thing changed in the code is the stream URL and title)
d) Http Server hosts the playlist and its segment *.ts files

Steps to reproduce:
1. Start the playback
2. Watch the files being loaded by Roku2 player from the Http Server's access log. The player loads the first 11 clips in rapid succession and then pauses (nothing unusual here, it is just pre-loading the segments in its buffer):

[SOURCE IP REMOVED] - - [12/Dec/2011:08:17:28 -0600] "GET /video/tv/test/episodes/today/playlist.m3u8 HTTP/1.1" 200 7722 "-" "Roku/DVP-4.1 (024.01E02669A)"
[SOURCE IP REMOVED] - - [12/Dec/2011:08:17:28 -0600] "GET /video/tv/test/episodes/today/playlist.m3u8 HTTP/1.1" 200 7722 "-" "Roku/DVP-4.1 (024.01E02669A)"
[SOURCE IP REMOVED] - - [12/Dec/2011:08:17:28 -0600] "GET /video/tv/test/episodes/today/ts/cv.00000.ts.ts HTTP/1.1" 200 4549036 "-" "Roku/DVP-4.1 (024.01E02669A)"
[SOURCE IP REMOVED] - - [12/Dec/2011:08:17:31 -0600] "GET /video/tv/test/episodes/today/ts/cv.00001.ts.ts HTTP/1.1" 200 6526984 "-" "Roku/DVP-4.1 (024.01E02669A)"
[SOURCE IP REMOVED] - - [12/Dec/2011:08:17:35 -0600] "GET /video/tv/test/episodes/today/ts/cv.00002.ts.ts HTTP/1.1" 200 4859048 "-" "Roku/DVP-4.1 (024.01E02669A)"
[SOURCE IP REMOVED] - - [12/Dec/2011:08:17:38 -0600] "GET /video/tv/test/episodes/today/ts/cv.00003.ts.ts HTTP/1.1" 200 7480896 "-" "Roku/DVP-4.1 (024.01E02669A)"
[SOURCE IP REMOVED] - - [12/Dec/2011:08:17:43 -0600] "GET /video/tv/test/episodes/today/ts/cv.00004.ts.ts HTTP/1.1" 200 6054164 "-" "Roku/DVP-4.1 (024.01E02669A)"
[SOURCE IP REMOVED] - - [12/Dec/2011:08:17:46 -0600] "GET /video/tv/test/episodes/today/ts/cv.00005.ts.ts HTTP/1.1" 200 4680824 "-" "Roku/DVP-4.1 (024.01E02669A)"
[SOURCE IP REMOVED] - - [12/Dec/2011:08:17:50 -0600] "GET /video/tv/test/episodes/today/ts/cv.00006.ts.ts HTTP/1.1" 200 5993440 "-" "Roku/DVP-4.1 (024.01E02669A)"
[SOURCE IP REMOVED] - - [12/Dec/2011:08:17:54 -0600] "GET /video/tv/test/episodes/today/ts/cv.00007.ts.ts HTTP/1.1" 200 4073208 "-" "Roku/DVP-4.1 (024.01E02669A)"
[SOURCE IP REMOVED] - - [12/Dec/2011:08:17:56 -0600] "GET /video/tv/test/episodes/today/ts/cv.00008.ts.ts HTTP/1.1" 200 5890228 "-" "Roku/DVP-4.1 (024.01E02669A)"
[SOURCE IP REMOVED] - - [12/Dec/2011:08:18:01 -0600] "GET /video/tv/test/episodes/today/ts/cv.00009.ts.ts HTTP/1.1" 200 7768536 "-" "Roku/DVP-4.1 (024.01E02669A)"
[SOURCE IP REMOVED] - - [12/Dec/2011:08:18:07 -0600] "GET /video/tv/test/episodes/today/ts/cv.00010.ts.ts HTTP/1.1" 200 5251216 "-" "Roku/DVP-4.1 (024.01E02669A)"
[SOURCE IP REMOVED] - - [12/Dec/2011:08:18:10 -0600] "GET /video/tv/test/episodes/today/ts/cv.00011.ts.ts HTTP/1.1" 200 10034876 "-" "Roku/DVP-4.1 (024.01E02669A)"


3. As the playback proceeds, watch the segment file name (which also indicates its count) on the screen. Once it reaches cv.00004.ts.ts it will start pre-loading more files from the server:

[SOURCE IP REMOVED] - - [12/Dec/2011:08:19:09 -0600] "GET /video/tv/test/episodes/today/ts/cv.00012.ts.ts HTTP/1.1" 200 3237736 "-" "Roku/DVP-4.1 (024.01E02669A)"
[SOURCE IP REMOVED] - - [12/Dec/2011:08:19:13 -0600] "GET /video/tv/test/episodes/today/ts/cv.00013.ts.ts HTTP/1.1" 200 4214772 "-" "Roku/DVP-4.1 (024.01E02669A)"
[SOURCE IP REMOVED] - - [12/Dec/2011:08:19:16 -0600] "GET /video/tv/test/episodes/today/ts/cv.00014.ts.ts HTTP/1.1" 200 8666612 "-" "Roku/DVP-4.1 (024.01E02669A)"
[SOURCE IP REMOVED] - - [12/Dec/2011:08:19:23 -0600] "GET /video/tv/test/episodes/today/ts/cv.00015.ts.ts HTTP/1.1" 200 8692180 "-" "Roku/DVP-4.1 (024.01E02669A)"


4. Watch the playback on the screen as it approaches the clip #10 - cv.00010.ts.ts - once the clip is played it goes directly to cv.00012.ts.ts, skipping cv.00011.ts.ts. The pattern is repeated several times during the play.

Summary
I believe there is some sort of a problem with the way pre-loading code works. It seems to "drop" the last buffered segment and happily goes to the next one. I tried many different things: varied encoding settings (ffmpeg 0.8 being the primary tool), encoding tools (videodub, GPAC), changed Http Servers, used different Roku2 boxes, used different internet connections and video files. The only thing that seems to make the difference is the bitrate - if it is above 4 mbps, the problem is less pronounced (I think this is due to the fact that wgen the individual segments are so large, pre-loading seems to work differently).

I can provide a sample stream and the code for the player upon request. This is a very serious problem (although the fix might be trivial) and it will prevent anyone using HLS streams from effectively utilizing Roku2. The problem is not present on Roku player (the previous version).
0 Kudos
9 REPLIES 9
martinh
Visitor

Re: Roku2 HLS video player occasionally skips segments

Any update on this request. Even I am having this issue with ROKU 2.

Same channel works fine in ROKU 1 but skips frames, keeps rebuffer in ROKU 2. Please fix this issue ASAP.
0 Kudos
Hexamon
Newbie

Re: Roku2 HLS video player occasionally skips segments

I was informed Roku has fixed the issue and the fix will be available in the next release of firmware.
0 Kudos
grahambr
Visitor

Re: Roku2 HLS video player occasionally skips segments

I am experiencing the exact same thing, with a bunch of artifacting. I know people have said that Roku has a fix, but is that confirmed? Is there a date of release?

I dont want to ditch Plex cause it seems to be the best streamer out there...but this is a big deal as I just dmped all my ATV2s for ROku2 JUST for this....

Blah...

Thoughts?
0 Kudos
Hexamon
Newbie

Re: Roku2 HLS video player occasionally skips segments

I have been informed there is a fix and it will be coming out soon. I wasn't given a release date, my guess would be it will be in the next release iteration. Probably within the next 2 months.
0 Kudos
ralcorta
Visitor

Re: Roku2 HLS video player occasionally skips segments

Any updates about this issue?

Can you specify the firmware version did you use for these tests?

Richo
0 Kudos
Hexamon
Newbie

Re: Roku2 HLS video player occasionally skips segments

The problem exists in all versions of 4.1 and 4.2, all builds. Now the good news - I've tested the new beta 4.3 build 1048 and it appears the problem is resolved there. I've only tested it on one device and, although, tested it with the same exact setup, can't be 100% sure until I can run more tests. I've asked Roku support engineers to add another Roku2 to the beta list. This will enable us to test it in our QA Lab. So, keep your fingers crossed.
0 Kudos
ralcorta
Visitor

Re: Roku2 HLS video player occasionally skips segments

Thank you for your reply, my fingers are crossed. 🙂

Richo
0 Kudos
ralcorta
Visitor

Re: Roku2 HLS video player occasionally skips segments

I'm just wondering, This issue could cause the subtitles run out of sync, after some time playing?

Richo
0 Kudos
Hexamon
Newbie

Re: Roku2 HLS video player occasionally skips segments

I can't comment on that one way or another. I haven't tested anything with subtitles.
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.