Issues on Playback using DASH.js

Hi,

I have followed the Play adaptive content using Dash.js Player | Design and Develop Vega Apps and created a sample dash player. The issue i’m seeing here is playback does not play the highest resolution or bitrate available. I have attached the log file and my DashJsPlayer code here.

console-1768371274419.log (85.8 KB)

DashJsPlayer.ts (6.9 KB)

I noticed InsufficientBufferRule message in the logs .
[AbrController]: Switching quality ... Switch from bitrate 991.296 to bitrate 162.364. Reason: {"message":"[InsufficientBufferRule]: Limiting maximum bitrate to avoid a buffer underrun."} ... OnFragmentLoadingCompleted ... video_144p_108k_h264.mp4

Thanks,
Hari

Hi @Hari_Krishnan,

Thank you for your question about DASH.js playback quality on Vega OS.

The issue is caused by DASH.js’s InsufficientBufferRule being too aggressive in downgrading video quality. From your logs, the ABR controller is switching to buffer-occupancy mode and limiting bitrate even when sufficient buffer exists:

[AbrController]: Switching quality ... Switch from bitrate 991.296 to bitrate 162.364.
Reason: {"message":"[InsufficientBufferRule]: Limiting maximum bitrate to avoid a buffer underrun."}

The default DASH.js configuration needs optimization for Vega OS. Update your DashJsPlayer.ts file by replacing lines 36-59 with this configuration:

this.player?.updateSettings({
    streaming: {
        abr: {
            autoSwitchBitrate: { audio: true, video: true },

            // Disable buffer-occupancy ABR (prevents aggressive downshifting)
            useBufferOccupancyABR: false,

            // Set practical bitrate limits
            maxBitrate: { video: 5000000 },      // 5 Mbps max
            minBitrate: { video: 500000 },       // 500 kbps min
            initialBitrate: { video: 1000000 },  // Start at 1 Mbps

            // Enable aggressive quality switching
            ABRStrategy: 'abrDynamic',
            bandwidthSafetyFactor: 0.85,
            fastSwitchEnabled: true,

            // Don't limit by viewport size
            limitBitrateByPortal: false,
            usePixelRatioInLimitBitrateByPortal: false
        },

        buffer: {
            stableBufferTime: 30,              // 30s stable buffer
            bufferToKeep: 20,                  // Keep 20s buffer
            bufferTimeAtTopQuality: 20,        // Allow top quality at 20s
            bufferTimeAtTopQualityLongForm: 30 // 30s for long content
        }
    },
    debug: {
        logLevel: dashTs.Debug.LOG_LEVEL_INFO  // Fix: was dashjs.Debug (line 59 bug)
    }
});

What this does:

  • Disables buffer-occupancy ABR to prevent premature quality reduction
  • Increases buffer thresholds to give more headroom
  • Sets a reasonable starting bitrate (1 Mbps) instead of lowest quality
  • Fixes a bug on line 59 (dashjs.Debug → dashTs.Debug)

Note: This configuration is based on DASH.js best practices and builds upon the Vega DASH.js integration documentation.

Additional Resources

Could you please try this solution and let us know if it resolves the issue?

Warm regards,
Aishwarya

Hi @amen ,

Thank you for suggestion. Unfortunately this configuration doesn’t fix the issue. Here is the log file.

log (84.8 KB)
I can see some of the parameters added are not supported

Settings parameter streaming.abr.useBufferOccupancyABR is not supported

Settings parameter streaming.abr.ABRStrategy is not supported

Settings parameter streaming.abr.bandwidthSafetyFactor is not supported

Settings parameter streaming.abr.fastSwitchEnabled is not supported

Settings parameter streaming.buffer.stableBufferTime is not supported

[13038][AbrController] [AbrController]: Switching quality in period 0 for media type video. Switch from bitrate 4495.918 to bitrate 162.364. Current buffer level: 6.713. Reason:{"message":"[InsufficientBufferRule]: Limiting maximum bitrate to avoid a buffer underrun.","bitrate":null}

Thanks,
Hari