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

HLS on Roku1 works perfect HLS on Roku2 does not switch

I am having trouble getting HLS to work properly on Roku2. We are following the Roku 4.3 guide exactly to prepare our HLS. We are using Apple's mediafilesegmenter and variantplaylistcreator to make our files. This method works perfectly on Roku1, it starts at the lowest bitrate and then quickly switches up to the highest bitrate seemlessly.

Roku2 starts at the lowest bitrate but never switches up to a higher bitrate. What is going on here? I have read where other people are having the same issue. Can anyone help me get HLS to work on Roku2?

Like I said I am using the Roku 4.3 guide step by step and I am using Apple's segmenter and playlist creator. We are using FFmpeg to encode according the Roku 4.3 guide and using Apache2 for delivery.

Roku1 works perfectly seamlessly switching from low to high or high to low. Roku2 never switches. What has changed on Roku2 to cause this?
0 Kudos
13 REPLIES 13
axiomy
Visitor

Re: HLS on Roku1 works perfect HLS on Roku2 does not switch

It should be noted that Roku2 only plays the first stream in the m3u8 file. I can reverse the stream order so that the highest rate is played first. Roku1 still switches like a champ starting at the lowest rate then switches up quickly. Roku2 only plays the first listed stream in the m3u8 file. Our streams work fine on other players like Iphone, jwplayer, flow player, etc. The only device that has issues is Roku2.

Is there some secret to fix Roku2. I read that Netflix, Hulu, and Crackle all had roku2 issues with HLS but it was fixed. Is there something that is not published about how to get this working?

I don't understand why it works on Roku1 and not Roku2.
0 Kudos
TheEndless
Channel Surfer

Re: HLS on Roku1 works perfect HLS on Roku2 does not switch

Make sure to set the SwitchingStrategy content metadata attribute. If none is set, it should use the default, but an issue was introduced in the 4.7 firmware that requires it to be explicitly set, otherwise it behaves as you describe.
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
axiomy
Visitor

Re: HLS on Roku1 works perfect HLS on Roku2 does not switch

I have <switchingStrategy>full-adaptation</switchingStrategy> below the stream format and it still won't switch. Any clues as to why?
0 Kudos
TheEndless
Channel Surfer

Re: HLS on Roku1 works perfect HLS on Roku2 does not switch

"axiomy" wrote:
I have <switchingStrategy>full-adaptation</switchingStrategy> below the stream format and it still won't switch. Any clues as to why?

Is that value getting set in your code? Just adding it to the XML isn't sufficient unless your code is expecting that element to be there.
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
axiomy
Visitor

Re: HLS on Roku1 works perfect HLS on Roku2 does not switch

Thank you... I have a channel based off the the video player and we are just using it on xml. There is nothing in my code to point out adaptive. Do you know where I need to put it? Thanks again! I will put it in my code and report back.
0 Kudos
axiomy
Visitor

Re: HLS on Roku1 works perfect HLS on Roku2 does not switch

BTW I went to your webpage and checked out your work. You have some amazing channel designs. Excellent work!
0 Kudos
bandal
Visitor

Re: HLS on Roku1 works perfect HLS on Roku2 does not switch

I would like to add SwitchingStrategy: "full-adaptation" in my videoplayer code too. Where would I put it and what file? I do not use xml, my database is in mysql to get the shows.

DA
0 Kudos
TheEndless
Channel Surfer

Re: HLS on Roku1 works perfect HLS on Roku2 does not switch

You would add it to the showFeed.brs file, in the parse_show_feed function. Just after where it sets StreamFormat, add the following:

If item.StreamFormat = "hls" Then
item.SwitchingStrategy = "full-adaptation"
End If

Hope that helps, and thanks for the compliments!
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
axiomy
Visitor

Re: HLS on Roku1 works perfect HLS on Roku2 does not switch

Thank you for your quick response! I will test it and report back my findings. Thanks again.
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.