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: 
PRIZM
Visitor

Re: HTTP Live Streaming Now Available For Developers

I will try that real quick and let ya know!

"RokuDaveW" wrote:
It looks like there's a bug in the videoplayer sample application. The StreamFormat should not be an array element in the XML. To work around this add the following line immediately before the call to SetContent() in appVideoScreen.brs.

To use the value that was passed in the XML data:
episode.StreamFormat = episode.StreamFormats[0]

--or--

To force it to use HLS for everything:
episode.StreamFormat = "hls"

I haven't had a chance verify this first hand, but code inspection seems to show what's wrong here. We'll fix this defect in the next release.
0 Kudos
PRIZM
Visitor

Re: HTTP Live Streaming Now Available For Developers

I am assuming you mean like this?

port = CreateObject("roMessagePort")
screen = CreateObject("roVideoScreen")
screen.SetMessagePort(port)

screen.Show()
episode.StreamFormat = episode.StreamFormats[0]
screen.SetContent(episode)
screen.Show()

"PRIZM" wrote:
I will try that real quick and let ya know!

"RokuDaveW" wrote:
It looks like there's a bug in the videoplayer sample application. The StreamFormat should not be an array element in the XML. To work around this add the following line immediately before the call to SetContent() in appVideoScreen.brs.

To use the value that was passed in the XML data:
episode.StreamFormat = episode.StreamFormats[0]

--or--

To force it to use HLS for everything:
episode.StreamFormat = "hls"

I haven't had a chance verify this first hand, but code inspection seems to show what's wrong here. We'll fix this defect in the next release.
0 Kudos
PRIZM
Visitor

Re: HTTP Live Streaming Now Available For Developers

Tried it this way in the appVideoScreen.brs and did not work. gave me the same thing starting to load the buffer indicator then back to springboard??? Hmmmm...

"PRIZM" wrote:
I am assuming you mean like this?

port = CreateObject("roMessagePort")
screen = CreateObject("roVideoScreen")
screen.SetMessagePort(port)

screen.Show()
episode.StreamFormat = episode.StreamFormats[0]
screen.SetContent(episode)
screen.Show()

"PRIZM" wrote:
I will try that real quick and let ya know!

"RokuDaveW" wrote:
It looks like there's a bug in the videoplayer sample application. The StreamFormat should not be an array element in the XML. To work around this add the following line immediately before the call to SetContent() in appVideoScreen.brs.

To use the value that was passed in the XML data:
episode.StreamFormat = episode.StreamFormats[0]

--or--

To force it to use HLS for everything:
episode.StreamFormat = "hls"

I haven't had a chance verify this first hand, but code inspection seems to show what's wrong here. We'll fix this defect in the next release.
0 Kudos
cgerrish
Visitor

Re: HTTP Live Streaming Now Available For Developers

Should this work with the simple streaming example as well?
0 Kudos
PRIZM
Visitor

Re: HTTP Live Streaming Now Available For Developers

Ok Reloaded The build zip back to the RoKu Box and it worked. This is based off of the videoplayer example / via XML feeds.

In the example videoplayer source file appVideoScreen.brs i changed to this:
screen.Show()
episode.StreamFormat = episode.StreamFormats[0]
screen.SetContent(episode)
screen.Show()

and in the XML I changed the Item to This:
<media>
<streamFormat>hls</streamFormat>
<streamQuality>SD</streamQuality>
<streamBitrate>700</streamBitrate>
<streamUrl>http://xxxxxx.xxx/apple/disney/disney.m3u8</streamUrl>
</media>
<synopsis>All Kids All the Time!</synopsis>
<genres>Kids</genres>
<runtime>86400</runtime>

the runtime 86400 is sec. in 24 hrs.

Hope this helps somebody!
0 Kudos
cgerrish
Visitor

Re: HTTP Live Streaming Now Available For Developers

I got it to work on the simple streaming example. For some reason it didn't work for me with a single live stream name, but it did work when I used a stream with an adaptive bitrate smil file on a wowza server.
0 Kudos

Re: HTTP Live Streaming Now Available For Developers

I had a situation where I had to power off the Roku box after doing a lot of testing with HTTP live streaming and thought I would mention it here in case anyone else runs into it.

I modified the simplevideoplayer example to point to a live stream coming from our XStream Live 2 encoder and streaming through a Wowza server. After repeatedly watching this stream and the Nasa channel live stream and doing lots of pause, rewind, and fastforward, what started happening was on my live stream was it would play for a few seconds and then go to the retrieving stream display. Then, after a while of this it finally got to the point that when I tried to view the stream it would get stuck at about the 1/3 point on the progress bar on the initial retrieve. At this point the same thing would happen on the Nasa channel live stream. Then I tried to watch a Netflix video and that worked fine, but if I went back to any of the live streams, it would get stuck at 1/3 on the initial retrieve. Then I tried watching the Ted Video's with the videoplayer example and they would get stuck on the initial retrieve as well. In parallel with all of this I would try to stream video (720p@2Mbps) to my laptop on the same network and there was never an issue, so the network was not the problem. Finally, I powered off and back on the Roku device and the live streams started playing normally again.

Thus, it seems watching live streams over and over or all of the pausing, rewinding, and fast forwarding put the Roku device into a corrupted state that could only be cleared by rebooting it. My software version is 2.5 b388 and model is N1000.
0 Kudos

Re: HTTP Live Streaming Now Available For Developers

"TimB_Kulabyte" wrote:
I had a situation where I had to power off the Roku box after doing a lot of testing with HTTP live streaming and thought I would mention it here in case anyone else runs into it.

I modified the simplevideoplayer example to point to a live stream coming from our XStream Live 2 encoder and streaming through a Wowza server. After repeatedly watching this stream and the Nasa channel live stream and doing lots of pause, rewind, and fastforward, what started happening was on my live stream was it would play for a few seconds and then go to the retrieving stream display. Then, after a while of this it finally got to the point that when I tried to view the stream it would get stuck at about the 1/3 point on the progress bar on the initial retrieve. At this point the same thing would happen on the Nasa channel live stream. Then I tried to watch a Netflix video and that worked fine, but if I went back to any of the live streams, it would get stuck at 1/3 on the initial retrieve. Then I tried watching the Ted Video's with the videoplayer example and they would get stuck on the initial retrieve as well. In parallel with all of this I would try to stream video (720p@2Mbps) to my laptop on the same network and there was never an issue, so the network was not the problem. Finally, I powered off and back on the Roku device and the live streams started playing normally again.

Thus, it seems watching live streams over and over or all of the pausing, rewinding, and fast forwarding put the Roku device into a corrupted state that could only be cleared by rebooting it. My software version is 2.5 b388 and model is N1000.



I have more to add to this. After rebooting the Roku I watched my live stream for about 15 minutes with no problems. Then, to get the software version mentioned above, I stopped the video to get the device info and then came back and started the live stream again. The second time it played for a few seconds and then went to the "loading, please wait" screen with the progress bar at 1/3 and got stuck there. I hit up and then select on play to play it again and on the initial retrieve it stalled at 1/3 and then started playing but then after about 5 more seconds of playing the stream it went to the "loading, please wait" screen with the progress bar stuck at 1/3. What different here is no pause, rewind, or fast forward, only watching the stream once, leaving it, and then coming back and watching it again.

Note that this streams plays fine on the iPad. If anyone at Roku would would be willing to take a look at the stream, I'd be happy to provide the URL privately to see if we can figure out why the Roku device is repeatedly hanging up on it. My email is timb@kulabyte.com.
0 Kudos
Anonymous
Visitor

Re: HTTP Live Streaming Now Available For Developers

Tim. Please do a manual update to the 2.6 firmware and see if it still occurs.
0 Kudos

Re: HTTP Live Streaming Now Available For Developers

"RokuPatrick" wrote:
Tim. Please do a manual update to the 2.6 firmware and see if it still occurs.


Thanks for the quick response. I have a new Roku box on the way so I will try with that one when it arrives. My kids would be quite upset if I bricked their Roku box. (Not that I heard of that happening, but I've just been working with the SDK for about 5 hours, i.e. total newbie so don't want to take any chances).
0 Kudos