Hello,
I am new to ROKU and using SampleVideoPlayer code to test my HLS streams. Even though, I have 6 different bit rates in my playlist.m3u8 file, ROKU picks the low quality stream and is not switching to high bit rate. I have enough internet bandwidth to use high quality stream.
Below is the section of code, which loads the streams from XML file:
e = curShow.media[0]
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
Below is the XML for an item:
<item sdImg="http://xxxzzz.com/images/gh.png" hdImg="http://xxxzzz.com/images/gh.png">
<title>My Test Stream 2</title>
<contentId>10053</contentId>
<contentType>Movies</contentType>
<contentQuality>SD</contentQuality>
<streamFormat>hls</streamFormat>
<media>
<streamQuality>SD</streamQuality>
<streamBitrate>0</streamBitrate>
<streamUrl>http://yyyzzz.com/playlist.m3u8</streamUrl>
</media>
<synopsis></synopsis>
<subtitleUrl></subtitleUrl>
<genres></genres>
<runtime>9600</runtime>
<hdBifUrl></hdBifUrl>
</item>
And below is the streams in playlist.m3u8 file:
#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=200000
http://yyyzzz.com/mp4:n_150k.mp4/playlist.m3u8?wowzasessionid=1937835477
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=400000
http://yyyzzz.com/mp4:n_300k.mp4/playlist.m3u8?wowzasessionid=1937835477
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=600000
http://yyyzzz.com/mp4:n_500k.mp4/playlist.m3u8?wowzasessionid=1937835477
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1000000
http://yyyzzz.com/mp4:n_800k.mp4/playlist.m3u8?wowzasessionid=1937835477
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1500000
http://yyyzzz.com/mp4:n_1200k.mp4/playlist.m3u8?wowzasessionid=1937835477
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2300000
http://yyyzzz.com/mp4:n_1800k.mp4/playlist.m3u8?wowzasessionid=1937835477
Any suggestions?
Thank you!