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

Selecting the Best Stream

Hello,
I have a wowza HLS stream, I have 4 different streams depending on the bandwidth of the viewer, as this is also used on the web, mobile, etc. How would i determine which video url to load based on the users connection speed? Is there a method that returns the connection speed or something?? As I have 4 urls it would be nice to be able to correlate that with Rokus 4 stars

Thanks in advance!
0 Kudos
2 REPLIES 2
destruk
Streaming Star

Re: Selecting the Best Stream

4 'stars' isn't asking for much bandwidth. Roku automatically selects the best stream.
If the stream bitrate equals:
0 = no dots
< 500 Kbps = 1 dot
< 800 Kbps = 2 dots
<1.1 Mbps = 3 dots
>= 1.1 Mbps = 4 dots
0 Kudos
RokuChris
Roku Employee
Roku Employee

Re: Selecting the Best Stream

With HLS, you want to use a single URL that points to a single master playlist. That playlist should contain the URLs for all the variants of your stream. The firmware will handle stream selection and switching automatically.

From the Component Reference: http://sdkdocs.roku.com/display/RokuSDK ... ideoScreen
When using HLS, the StreamUrls and StreamQualities array should each have exactly one element. If the HLS stream has only a single bitrate stream, the StreamBitrates array should contain one element specifying that bitrate. If the stream contains more than one variant stream at multiple bitrates, the StreamBitrates array should contain one element with a value of zero
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.