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

Scene Graph - Video component How to control stream quality?

Hello everyone, I am in dire need of help here:

I am using SceneGraph Video component and can not figure out how can I control stream quality/stream switching. This used to be available in roVideoPlayer using ContentMetaData settings as: MinBandwidth/MaxBandwidth, Streams array where I could set individual streams, SwitchingStrategy. But these parameters do not seem to work with with SceneGraph.

I am also willing to provide more than adequate compensation to anyone that can help me resolve this and provide consulting services. Please let me know and thank you for your help in advance.
0 Kudos
6 REPLIES 6
adamkaz
Channel Surfer

Re: Scene Graph - Video component How to control stream qual

You can specify these parameters now under the "content" field. I have not tested this out extensively, but from simple examples it seems to be working. Content is the third field listed here: http://sdkdocs.roku.com/display/sdkdoc/Video. If you want more help, just send me a PM.
0 Kudos
Yuriy_OM
Visitor

Re: Scene Graph - Video component How to control stream qual

Absolutely need help:) just sent you a PM
0 Kudos
RokuJoel
Binge Watcher

Re: Scene Graph - Video component How to control stream qual

So, it appears that MaxBandwidth / MinBandwidth are not currently recognized in the SceneGraph video component. We are investigating to see which content metadata passed down to the video subsystem and which are not. All the content metadata that works in the roVideoPlayer and roScreen should work, but clearly, this is not the case at the moment.

- Joel
0 Kudos
Yuriy_OM
Visitor

Re: Scene Graph - Video component How to control stream qual

Hi Joel,

I can confirm min/max bitrate variables do not work, also I have mentioned in another thread that bitrate switching might not work either. Here is code snippet again that demonstrates it:



newContent = CreateObject("roSGNode", "ContentNode")
newContent.streams=[{ url : "http://vevoplaylist-live.hls.adaptive.level3.net/vevo/ch1/03/prog_index.m3u8",
bitrate : 1060,
contentid : "03",
quality: false
},
{ url : "http://vevoplaylist-live.hls.adaptive.level3.net/vevo/ch1/05/prog_index.m3u8",
bitrate : 2640,
contentid : "05" ,
quality: true
},
{url : "http://vevoplaylist-live.hls.adaptive.level3.net/vevo/ch1/06/prog_index.m3u8",
bitrate : 4000,
contentid : "06" ,
quality: true
}]
newContent.streamFormat = "hls"
newContent.maxBandwidth = 2640
newContent.SwitchingStrategy = "full-adaptation"
newContent.Live = true
m.video.content = newContent
m.video.ObserveField("errorMsg", "checkErrors")
m.video.ObserveField("bufferingStatus", "buffStat")
m.video.ObserveField("streamingSegment", "showBitrate")
m.video.ObserveField("duration", "checkPosition")
m.video.control = "play"


Also, could you ask your guys how can one force a switch to a different stream ( in SceneGraph or roVideoPlayer). Is setting max/minBandwidth dynamically (while stream is playing) makes a player to switch to different stream?
0 Kudos
RokuJoel
Binge Watcher

Re: Scene Graph - Video component How to control stream qual

I think, as TheEndless said to you in another thread, you are approaching this wrong for HLS. Now I could be wrong here, being a neophyte to the new SceneGraph, but I think that for HLS adaptive streaming, you only would have one URL per content node, which I understand to represent a single item - one video for example.

Even were that not so, you are creating an array of streams in your code which is not how you do HLS on Roku - an array of streams is for Progressive MP4 and each stream would be a variant stream. For HLS, you have a single multibitrate URL and you set the bitrate to [0] unless the highest bitrate is 1500kbps in which case you can set the bitrate to the lowest bitrate stream.

Content.stream:{url : "http://vevoplaylist-live.hls.adaptive.level3.net/vevo/ch1/03/prog_index.m3u8"
bitrate : 0,
contentid : "03",
quality: true}


Note that if a device is running in SDTV mode, then you would choose quality:false otherwise, set that to true.

- Joel
0 Kudos
Yuriy_OM
Visitor

Re: Scene Graph - Video component How to control stream qual

Hi Joel, as I replied in the other thread - it does not really matter, stream switching does not work and it is impossible to control quality. I used "Streams" variable as it provides (seems to provide) more control and this technique worked in roVideo Player. Here is a single maifest HLS example for you ( note the manifest has 6 different bitrates)


newContent = CreateObject("roSGNode", "ContentNode")
newContent.url= "http://vevoplaylist-live.hls.adaptive.level3.net/vevo/ch1/appleman.m3u8"
newContent.streamFormat = "hls"
newContent.maxBandwidth = 2640
newContent.SwitchingStrategy = "full-adaptation"
newContent.Live = true
m.video.content = newContent
m.video.control = "play"


Test it for yourself. Roku will always play stream number 06 ( as it is the last one in the list). min/maxBandwidth does not have any effect whatsoever. Bitstream switch will never occur. Tested this on Roku stick and roku 3. Please try it and let me know your findings.
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.