Fine Tuning

This tutorial shows how to configure DVR playback on AMP properly.

  1. Fast Playback Startup

  2. Playback Bitrate Ceiling

1. Fast Playback Startup

Startup time can be adjusted by lowering the initial rendition quality. The player’s ABR mechanism performs up switching for higher renditions if user agent bandwidth permits it.

    const config = {
		autoplay: true,
		autoplayPolicy: "muted",
		hls: {
			quality: {
					startLevel: 0 // use the lowest
			}
		}
	}

Hls startLevel allows the following number type values:

  • 0 Starts from the Lowest rendition available in the manifest.

  • -1 Player will start from rendition matching download bandwidth.

  • Upper values represents the available renditions in the manifest bitrate ladder; the higher the value is, the better the initial quality is.

2. Playback Bitrate Ceiling

The player allows limiting the maximum bitrate selectable by the ABR mechanism. This might be useful for scenarios like browser’s memory flooding, small viewport players, live background playback, and others.

    const config = {
		autoplay: true,
		autoplayPolicy: "muted",
		hls: {
			maxBitrate: 500000 // 0.5 Mbps
		}
	}

Dash and Hls maxBitrate represents the bitrate ceiling value in bits per second bps; this can be adjusted through player configuration or runtime.

amp.maxBitrate = 2000000 // 2.0 Mbps

The player ignores the ceiling value when there are no matching renditions with the given value; the user’s manually selects an arrangement through the player’s quality selector or API.

Last modified: Mar/2023, AMP Support.