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: 
dynamitemedia
Binge Watcher

multiple bitrates

since we get our videos from XML, how do we pass the StreamBitrates, streamURLS and and StreamContentIDs to roku to create the array for the multiple bitrates?

the one issue i see is that some videos may have 2 bit rates some have 4 . so its not as easy as just adding -500k.mp4 or -2000k.mp4 in the roku code.

we will have to send these to roku from the xml. but how do we do that when we don't have uniformity on these bit rates etc? cause when looking over the code in the showfeed.brs it dont see how i can do this, as it seems it must be hadrcoded in there the bitrate.

any help would be appreciated
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
15 REPLIES 15
Xerces77
Visitor

Re: multiple bitrates

In the XML file defining the content, you'll define multiple media tags for each bitrate.
0 Kudos
dynamitemedia
Binge Watcher

Re: multiple bitrates

could you explain a bit more and maybe show an example?

i am using the video player example, i just wish the videos were more uniform in each types of bitrate etc, but i dont have that coming from the DB some are 500, 2000 or 4000 etc some maybe older nad have different bitrate i dont know
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
Xerces77
Visitor

Re: multiple bitrates

Look at the videoplayer code in the SDK. In the XML file identifying each video, there's the <media> tag containing <streamBitRate> etc. etc.. Simply create multiple media tags within the same <item> tag to identify different formats, bitRates, etc.
0 Kudos
dynamitemedia
Binge Watcher

Re: multiple bitrates

yes dynamically send the urls that way. is no problem

but the issue is since there is no set amount of urls/bitrates coming from the server. how does Roku handle that? or do we just call them all the same?
like this ?

<streamBitrate>500</streamBitrate>
<streamBitrate>2000</streamBitrate>
<streamBitrate>4000</streamBitrate>
<streamUrl>500</streamUrl>
<streamUrl>2000</streamUrl>
<streamUrl>4000</streamUrl>


and then Roku will understand that? I know how to send them its what gets done with them is my question or is that what this is doing?


'media may be at multiple bitrates, so parse an build arrays
for idx = 0 to 4
e = curShow.media[idx]
if e <> invalid then
item.StreamBitrates.Push(strtoi(validstr(e.streamBitrate.GetText())))
item.StreamQualities.Push(validstr(e.streamQuality.GetText()))
item.StreamUrls.Push(validstr(e.streamUrl.GetText()))
endif
next idx


Thanks for your help
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
Xerces77
Visitor

Re: multiple bitrates

For example:
I've got HD and SD versions of the same video; I specify the bitRate, streamUrl etc for it. Based on the end-users display settings for their box, The app will choose the appropriate settings and the video will play. The xml file for your content and the code that parses it will determine in what format and settings your content gets played.

Pardon if this sounds confusing but I *think* you need to review the code and understand how it parses the xml content files and determines the appropriate bit rate
0 Kudos
dynamitemedia
Binge Watcher

Re: multiple bitrates

thanks for your help, i had it right before in my logic but changed it. i didn't realize that it was doing all of it already and i didnt have to alter the ROKU code...

BTW what channel(s) do you have?? would like to check them out... you seem new here
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
Xerces77
Visitor

Re: multiple bitrates

I'm haarrrrd at work developing it as you read this. Yes I am new to Roku started a couple days ago.
0 Kudos
dynamitemedia
Binge Watcher

Re: multiple bitrates

for anyone that ever gets stuck on this and is searching the forum for a answer.... here is what our xml looks like, you can test by adding the followin Bitrate Debug Info on screen: Home 5x, Rew 3x, FF 2x

<item>
<contentId>4407</contentId>
<contentQuality>SD</contentQuality>
<streamFormat>mp4</streamFormat>
<media>
<streamBitrate>500</streamBitrate>
<streamQuality>SD</streamQuality>
<streamUrl>http://yoursite.com/videos/4407.mp4</streamUrl>
</media>
<media>
<streamBitrate>1000</streamBitrate>
<streamQuality>SD</streamQuality>
<streamUrl>http://yoursite.com/videos/4407-hires.mp4</streamUrl>
</media>
<media>
<streamBitrate>2000</streamBitrate>
<streamQuality>HD</streamQuality>
<streamUrl>http://yoursite.com/videos/4407-2000.mp4</streamUrl>
</media>
<media>
<streamBitrate>4000</streamBitrate>
<streamQuality>HD</streamQuality>
<streamUrl>http://yoursite.com/videos/4407-4000.mp4</streamUrl>
</media>
</item>

So good luck to anyone that may have or will be stuck on this, this should help you out... thanks for the folks that helped me understand this as well
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
destruk
Streaming Star

Re: multiple bitrates

This is useful information! Thanks!
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.