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

HLS Manifest - Force Client to start with specific segment

Hi

I originally posted this question on the "Roku Streaming forum" and it was recommended to me their that I re-post this question here on the Developer forum. Sorry for double posting in this case.

This is my first post here, so I hope I include all the necessary details.

I create HLS content and give the player 2 variants one at 96K and one at 300K. I send the client a variant playlist and the client chooses the relevant segment based on its perceived available bandwidth. This works as expected and plays well on all devices.

However what I would like to do now is to force the HLS client to start playback so that it always uses the first segment at the lowest variant bitrate (e.g. 96K segment) after this then allow the HLS client to choose the bitrate best sutied to its available bandwidth.

Is there way to generate the variant playlist manifest files so that I can make the client to always choose the 96K segment initially and then let HLS client decide there after based on bandwidth? The specification seems to imply that this is possible, though some sections are contradictory, in section 6.2.4 Proding Variant Stream states,

" Content that appears in one variant Playlist file but not in
another MUST appear either at the beginning or at the end of the
Playlist file and MUST NOT be longer than the target duration."

However at other times it says that both variant playlists must have the same entrys.

Devices support version 3 and 4 of the HLS draft standard.

Any help much appreciated

Thanks
Declan
declan

Posts: 1
Joined: Fri Aug 31, 2012 12:04 pm
0 Kudos
6 REPLIES 6
RokuRobB
Streaming Star

Re: HLS Manifest - Force Client to start with specific segme

There isn't a way to control the bitrate selection algorithm in this way. The only content metadata options available for HLS that are related to this are MinBandwidth and Maxbandwidth. These allow you to specify the minimum and maximum bandwidth stream to select. However, you can't tell the player to start with one bitrate specified in the manifest, and then have the default adaptive bitrate selection kick in.
0 Kudos
MSGreg
Visitor

Re: HLS Manifest - Force Client to start with specific segme

Based on reading the spec, isn't each segment from different bitrates interchangeable? Why not just replace the higher bitrate segments with the lower bitrate segments. Either in the manifest or the actual files.
0 Kudos
RokuChris
Roku Employee
Roku Employee

Re: HLS Manifest - Force Client to start with specific segme

"declan" wrote:
Is there way to generate the variant playlist manifest files so that I can make the client to always choose the 96K segment initially and then let HLS client decide there after based on bandwidth?


The default minBandwidth is 250kbps, so for the player to find a 96k variant, you need to set minBandwidth to something lower then 96.
0 Kudos
RokuJoel
Binge Watcher

Re: HLS Manifest - Force Client to start with specific segme

if you set videoclip.streambitrates=[96] it should try the lowest bitrate first before switching to the faster bitrate as long as the highest bitrate is lower than 1500kbps.

You'll have to have videoclip.switchingStrategy="full-adaptation" or one of the other switching strategies explicitly set; for 96kbps however, which is probably an audio-only stream (imagine what 96kbps video would look like) I have no idea how the player would handle that, or even if it would handle that, set minbandwidth=90 and see what happens...

Setting streamBitrates=[0] hands all control of initial bitrate choice to the player, however, without SwitchingStrategy set, it probably won't switch at all.

Based on reading the spec, isn't each segment from different bitrates interchangeable? Why not just replace the higher bitrate segments with the lower bitrate segments. Either in the manifest or the actual files.


That is what the player does, but it is not directly under your control, and the above settings may not always work exactly as I described.

- Joel
0 Kudos
MSGreg
Visitor

Re: HLS Manifest - Force Client to start with specific segme

"RokuJoel" wrote:
Based on reading the spec, isn't each segment from different bitrates interchangeable? Why not just replace the higher bitrate segments with the lower bitrate segments. Either in the manifest or the actual files.


That is what the player does, but it is not directly under your control, and the above settings may not always work exactly as I described.

- Joel


That makes sense. What I meant was literally copying the first lower bitrate segment over the first higher bitrate segment so that the player thinks its playing the higher bitrate. Then you're not relying on or changing how the player picks the bitrate.
0 Kudos
TheEndless
Channel Surfer

Re: HLS Manifest - Force Client to start with specific segme

"MSGreg" wrote:
"RokuJoel" wrote:
Based on reading the spec, isn't each segment from different bitrates interchangeable? Why not just replace the higher bitrate segments with the lower bitrate segments. Either in the manifest or the actual files.


That is what the player does, but it is not directly under your control, and the above settings may not always work exactly as I described.

- Joel


That makes sense. What I meant was literally copying the first lower bitrate segment over the first higher bitrate segment so that the player thinks its playing the higher bitrate. Then you're not relying on or changing how the player picks the bitrate.

I would think that's likely to confuse the player more than anything else. If the playlist has told the player that that segment is 2.5mbps, then there's no telling how it might react to receiving a lower bitrate. At the very least, I would think it would try to buffer X seconds based on 2.5mbps before starting playback, which would be a lot more at 96kbps, and defeat the purpose of starting with a lower bitrate stream in the first place (since it has to download the same amount of data anyway).
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
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.