Forum Discussion

gpasq's avatar
gpasq
Visitor
12 years ago

HLS quality issue

I'm streaming HLS video in my app and I'm running into a problem. When I feed the video player a playlist URL, it always picks (and sticks with) the lowest resolution stream. The playlist file looks like:

#EXTM3U
#EXT-X-VERSION:2
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=596000,CODECS="avc1.4d001f,mp4a.40.2",RESOLUTION=320x180
01.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1096000,CODECS="avc1.4d001f,mp4a.40.2",RESOLUTION=640x360
02.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1596000,CODECS="avc1.4d0028,mp4a.40.2",RESOLUTION=864x486
03.m3u8

If I construct a URL using the highest res stream (03.m3u8) "by hand" and give it to teh player, it plays high res, as expected. But if I just give it the URL to get the above playlist, it just plays 01.m3u8

Any thoughts how I can get to play the highest resolution feed?

2 Replies

  • Make sure to set switchingStrategy="full-adaptation" on your media object:

    ...
    video.switchingStrategy="full-adaptation"

    di = CreateObject("roDeviceInfo")
    if di.GetDisplayType() = "HDTV" then
    video.streamqualities=["HD"]
    else
    video.streamqualities=["SD"]
    end if
    video.StreamBitrates=[0]
    videoscreen.setcontent(video)
    videoscreen.play()
    ...