Shaka Player picking low quality variant at startup

1.7k Views Asked by At

When ABR is enabled, playback starts with the selected track but quickly jumps to lowest bitrate track in shaka player:

Expected

Track (track [id=14]) should be selected and continued in the same track when bandwidth available.

What I tried

Initially i tired setting abr.defaultBandwidthEstimate as 1927692 (track [id=14]) on manifestparsed event, but it picked the next track (track [id=13]). So i did following to find defaultBandwidthEstimate.

defaultBandwidthEstimate = selectedTrack.bandwidth / abr.bandwidthUpgradeTarget

defaultBandwidthEstimate = 1927692 / 0.85

then, the player picked the required track (track [id=14]).

Problem

Playback starts with the required track (track [id=14]) but immediately after few milliseconds fallback to lowest bandwidth track. I also observed current estimated bandwidth from player was very low.

Switch History:

[{"timestamp":1595138570.405,"id":14,"type":"variant","fromAdaptation":true,"bandwidth":1927692},
{"timestamp":1595138570.405,"id":2,"type":"text","fromAdaptation":true,"bandwidth":null},
{"timestamp":1595138578.943,"id":10,"type":"variant","fromAdaptation":true,"bandwidth":295971}]

All tracks

[{id: 16, active: false, type: "variant", bandwidth: 5127146, language: "fr", …},
{id: 15, active: false, type: "variant", bandwidth: 2559584, language: "fr", …},
{id: 14, active: false, type: "variant", bandwidth: 1927692, language: "fr", …},
{id: 13, active: false, type: "variant", bandwidth: 1327795, language: "fr", …},
{id: 12, active: false, type: "variant", bandwidth: 695902, language: "fr", …},
{id: 11, active: false, type: "variant", bandwidth: 527931, language: "fr", …},
{id: 10, active: true, type: "variant", bandwidth: 295971, language: "fr", …}]
1

There are 1 best solutions below

0
On

ShakaPlayer provides us the configuration to restrict the minimum it can go for a given manifest/Internet. you can try the below to restrict the ABR to switch bit rates higher than given minBitratePixelValue.

 shakaPlayer.configure({
            restrictions: {
                minPixels: minBitratePixelValue,
                minHeight: minBitratePixelValue
            }

Hope this helps :)