Forum Discussion

zig_zag's avatar
zig_zag
Visitor
9 years ago

Scene Graph Video - Multiple Streams

Hi! How can i pass multiple video streams to the Scene Graph Video? Or if i can't, what should i do to play a video with the quality depending on user's network connection?
Thanks!
- Gabriel

2 Replies

  • RokuJoel's avatar
    RokuJoel
    Binge Watcher
    Hi Gabriel,

    If you are playing mp4 files, you would hand the video node an array of streams. This on the Content Metadata page in our docs:


    Video={}
    Video.streams=[{url : "http://me.com/x-384.mp4"
                          bitrate : 384
                          quality : false
                          contentid : "x-384"}
                   {url : "http://me.com/x-2500.mp4"
                           bitrate : 2500
                          quality : true
                          contentid : "x-1500"}
                   {url : "http://me.com/x-5000.mp4"
                           bitrate : 5000
                          quality : true
                          contentid : "x-5000"}]


    If you are playing HLS or another similar format, you generally hand the player the Master Playlist file containing each of the bitrate variant streams, along with a switching strategy.


    Video={}
    video.streamFormat="hls"
    video.Switching_Strategy="full-adaptation"
    Video.streams=[{url : "http://me.com/live/master_playlist.m3u8"
                          bitrate : 0
                          quality : false}]





    Hope that helps,

     - Joel
  • Hi Joel!

    This is exactly what i need. I found it in the documentation but when i saw this:
    "Used by roVideoPlayer and roVideoScreen to specify the content metadata for a set of fixed bitrate streams. Each array item specifies the URL, bitrate, etc. for one stream variant."

    i thought that it's not available for SG Video.

    Thank you and have a good day!!
    - Gabriel