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

Selecting proper stream from .m3u8

I have video's being hosted on Brightcove. For any given video that provide a master m3u8 playlist pointing to multiple streams of different bandwidths. If I point the roku to this playlist directly, it just takes the first stream in the playlist and plays it. In my case this is a problem because the first stream in the list happens to be the lowest bandwidth stream and it looks terrible on a HD screen. Is there a way to have the Roku choose the right stream?

In the event that isn't possible, I have begun parsing the playlist and pulling out the individual streams and populating the episode object's StreamUrls, StreamQualities ("HD" or "SD"), and StreamBitrates. The problem is that when I give the roku (hooked up to an HD TV via HDMI) an episode with an HD stream and a SD stream, it shows the SD feed instead of the HD one. Why is this?

How can I make the Roku play the appropriate stream?
0 Kudos
4 REPLIES 4
TheEndless
Channel Surfer

Re: Selecting proper stream from .m3u8

Be sure to set the SwitchingStrategy content metadata attribute. An issue was introduced in the latest firmware that causes the behavior you described if the SwitchingStrategy isn't explicitly set.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
greengiant83
Visitor

Re: Selecting proper stream from .m3u8

How do you set it? What object do you set this on? What should it be set to?
0 Kudos
RokuChris
Roku Employee
Roku Employee

Re: Selecting proper stream from .m3u8

"greengiant83" wrote:
How do you set it? What object do you set this on? What should it be set to?


switchingStrategy is an attribute of the content-meta-data structure that defines your video. Possible values are called out in the Component Reference: http://sdkdocs.roku.com/display/RokuSDK ... +Meta-Data
0 Kudos
greengiant83
Visitor

Re: Selecting proper stream from .m3u8

Awesome. Thank you
0 Kudos