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 setupa) 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.
SummaryI 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).