katycorp
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2011
11:32 AM
Inconsistent HLS playing behavior
Hello all,
I'm streaming a live video using HLS on the roku. Most of the time, it plays fine. But sometimes I get the generic "An unexpected problem (but not server timeout or HTTP error) has been detected. | index = -3" error. If I try to play it a couple more times right away, it plays fine. I'm puzzled. Any suggestions on how to debug this? The bitrate is 816kb/s with 10 second segments, but I'm using 0 for the bitrate setting.
Thanks!
Kaitlin
I'm streaming a live video using HLS on the roku. Most of the time, it plays fine. But sometimes I get the generic "An unexpected problem (but not server timeout or HTTP error) has been detected. | index = -3" error. If I try to play it a couple more times right away, it plays fine. I'm puzzled. Any suggestions on how to debug this? The bitrate is 816kb/s with 10 second segments, but I'm using 0 for the bitrate setting.
Thanks!
Kaitlin
7 REPLIES 7

RokuKevin
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2011
12:12 PM
Re: Inconsistent HLS playing behavior
Try using 816 for the bitrate setting. We could provide more assistance if you shared the stream url.
--Kevin
--Kevin

SolveLLC
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2011
05:58 AM
Re: Inconsistent HLS playing behavior
I can confirm that we are seeing the same issue.

SolveLLC
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2011
02:20 PM
Re: Inconsistent HLS playing behavior
A couple more details.
* This bug exists in the 2.x firmware as well.
* We are only seeing this behavior when resuming from a playback position. Video will exit with a -3, but if you try it several times it will play at the correct position.
* A sleep statement just before playing seems to help. However, it requires a sleep(3000) before the it will play back without fail.
* This bug exists in the 2.x firmware as well.
* We are only seeing this behavior when resuming from a playback position. Video will exit with a -3, but if you try it several times it will play at the correct position.
* A sleep statement just before playing seems to help. However, it requires a sleep(3000) before the it will play back without fail.

RokuKevin
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2011
08:52 AM
Re: Inconsistent HLS playing behavior
Thanks Michael. That's good info.
--Kevin
--Kevin
katycorp
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2011
10:39 AM
Re: Inconsistent HLS playing behavior
So I think I figured out what my problem was. I was using example code from the example app (videoplayer) that is in the SDK (2.8 ). From the appVideo.brs file from that example:
I used most of this code for my app. Taking out the first screen.Show() helped my issue. I think there is some kind of asynchronous behavior that may cause a race condition. So far I haven't need the sleep(3000) to keep it from erroring out again. For some reason, I only experienced this issue with the hls streamformat. It seems like it is possible to click play before the screen.SetContent() function has returned and this causes it to error out because there's no content set. Is this just an oversight in the example code or is it in there for a reason?
-Kaitlin
Function showVideoScreen(episode As Object)
if type(episode) <> "roAssociativeArray" then
print "invalid data passed to showVideoScreen"
return -1
endif
port = CreateObject("roMessagePort")
screen = CreateObject("roVideoScreen")
screen.SetMessagePort(port)
screen.Show()
screen.SetPositionNotificationPeriod(30)
screen.SetContent(episode)
screen.Show()
'Uncomment his line to dump the contents of the episode to be played
'PrintAA(episode)
I used most of this code for my app. Taking out the first screen.Show() helped my issue. I think there is some kind of asynchronous behavior that may cause a race condition. So far I haven't need the sleep(3000) to keep it from erroring out again. For some reason, I only experienced this issue with the hls streamformat. It seems like it is possible to click play before the screen.SetContent() function has returned and this causes it to error out because there's no content set. Is this just an oversight in the example code or is it in there for a reason?
-Kaitlin

RokuKevin
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2011
02:22 PM
Re: Inconsistent HLS playing behavior
This is just an oversight in the example code.... There is no reason for that first .Show() method.
Thanks for pointing it out.
--Kevin
Thanks for pointing it out.
--Kevin
nickatynot
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2011
06:52 PM
Re: Inconsistent HLS playing behavior
Kaitlin, you are a lifesaver! The additional screen.Show() is still in the video player example, and I too was using that as the base for my channel. It worked fine for me on Roku2, but apparently it was causing this intermittent behavior on a Roku1.
Thanks!
Nick
Thanks!
Nick