Override stream variant parameters

Overriding stream variant parameters is optional, and available should you want the player or application to override the default order of the variants when the HLS playlist is requested. This may be useful if you would like a specific HLS variant to take precedence over another based on the user consuming the content.

You can pass stream variant ordering parameters from the player or app for both Server‑Side Beaconing (SSB) and IMA SDK implementations.

Override the variant selection and order

The default HLS playlist order is determined by the publisher.

You can override the variant selection and order parameters specified during stream creation. This allows you to specify the subset of variants that should be included in the response to a master playlist request and the order of those variants. You can also override other default ad tag parameters.

The subset and order of variants remain the same for the life of the stream unless explicitly overridden by the client by providing new values on the HTTP request for master playlist. The parameters are accepted either as part of the "adTagParameters" structure when using the IMA SDK or as additional HTTP GET parameters when using SSB.

If no ordering parameters are specified, the playlists are returned in the original order, as returned by the publisher.

Stream parameters that override variant selection

Parameter Description Examples
dai-ot
                         

The order type information describing the type of values specified by dai-ov parameter. Should be either "bw" to indicate bandwidth (closest match) OR a bandwidth + resolution (exact match) based ordering. At least one of bandwidth or resolution must be specified. The default value is "bw".

If the dai-ot parameter is specified, but dai-ov is not, the playlist returns all variants in the original order.

dai-ot=bw
dai-ot=bw_res
dai-ov

Comma-separated values specifying order of media playlists to be returned. Must be used together with dai-ot and each value should be of the same type described by dai-ot parameter. A special value "audio" can be used to specify the audio variant.

If multiple variants with the same order value are present (for example, two variants of the same bandwidth but different resolutions), the original order is maintained among those variants.

dai-ot=bw&dai-ov=2025837,1406061
dai-ot=bw_res&dai-ov=1400000:640x360,audio
dai-sr The range of bandwidths for video variants to be returned. To select all higher bandwidths, only specify the startBandwidth. To select all lower bandwidths, only specify :endBandwidth (prefixed with a colon ":"). dai-sr=1300000:2500000
dai-aor The range of bandwidths for audio variants to be returned. To select all higher bandwidths, only specify the startBandwidth. To select all lower bandwidths, only specify :endBandwidth (prefixed with a colon ":"). dai-aor=60000
dai-os The video variant bandwidth to be placed at the top of the master playlist. The variant closest in value to startBandwidth is selected. If two values are equidistant, the lowest value is selected. When this param is provided, and dai-aor is not, all audio-only variants are excluded. dai-os=1700000
dai-excl Renditions to be excluded from the playlist. Supports subtitles and the audio codecs ac-3 and ec-3. dai-excl=subtitles
dai-excl=ec-3
dai-excl=ac-3

See examples

Select two variants

Request


https://dai.google.com/linear/hls/event/<asset_key>/master.m3u8?dai‑ot=bw&dai‑ov=2025837,1406061
 

Response


#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2025837,RESOLUTION=960x540,CODECS="mp4a.40.2,avc1.4d401f"
https://dai.google.com/linear/hls/event/<asset_key>/encoder/<encoder_id>/session/<session_id>/bandwidth/2025837.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1406061,RESOLUTION=640x360,CODECS="mp4a.40.2,avc1.4d401f"
https://dai.google.com/linear/hls/event/<asset_key>/encoder/<encoder_id>/session/<session_id>/bandwidth/1406061.m3u8

 

Select one audio variant and one video variant

Request


https://dai.google.com/linear/hls/event/<asset_key>/master.m3u8?dai‑ot=bw&dai‑ov=audio,1406061
 

Response


#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=64000,RESOLUTION=480x270,CODECS="mp4a.40.2"
https://dai.google.com/linear/hls/event/<asset_key>/encoder/<encoder_id>/session/<session_id>/bandwidth/audio.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1406061,RESOLUTION=640x360,CODECS="mp4a.40.2,avc1.4d401f"
https://dai.google.com/linear/hls/event/<asset_key>/encoder/<encoder_id>/session/<session_id>/bandwidth/1406061.m3u8

 

Match based on bandwidth and resolution

Request


https://dai.google.com/linear/hls/event/<asset_key>/master.m3u8?dai‑ot=bw_res&dai‑ov=1400000:640x360,audio
 

Response


#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1406061,RESOLUTION=640x360,CODECS="mp4a.40.2,avc1.4d401f"
https://dai.google.com/linear/hls/event/<asset_key>/encoder/<encoder_id>/session/<session_id>/bandwidth/1406061.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=64000,RESOLUTION=480x270,CODECS="mp4a.40.2"
https://dai.google.com/linear/hls/event/<asset_key>/encoder/<encoder_id>/session/<session_id>/bandwidth/audio.m3u8

 

Match based on a range of bandwidths

Request


https://dai.google.com/linear/hls/event/<asset_key>/master.m3u8?dai-sr=1300000:2500000&dai-aor=60000
 

Response


#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1406061,RESOLUTION=640x360,CODECS="mp4a.40.2,avc1.4d401f"
https://dai.google.com/linear/hls/event/<asset_key>/encoder/<encoder_id>/session/<session_id>/bandwidth/1406061.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2025837,RESOLUTION=960x540,CODECS="mp4a.40.2,avc1.4d401f"
https://dai.google.com/linear/hls/event/<asset_key>/encoder/<encoder_id>/session/<session_id>/bandwidth/2025837.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=64000,RESOLUTION=480x270,CODECS="mp4a.40.2"
https://dai.google.com/linear/hls/event/<asset_key>/encoder/<encoder_id>/session/<session_id>/bandwidth/audio.m3u8

 

Specify a start bandwidth

Request


https://dai.google.com/linear/hls/event/<asset_key>/master.m3u8?dai-os=1700000
 

Response


#EXTM3U
#EXT-X-VERSION:3
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1406061,RESOLUTION=640x360,CODECS="mp4a.40.2,avc1.4d401f"
https://dai.google.com/linear/hls/event/<asset_key>/encoder/<encoder_id>/session/<session_id>/bandwidth/1406061.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2025837,RESOLUTION=960x540,CODECS="mp4a.40.2,avc1.4d401f"
https://dai.google.com/linear/hls/event/<asset_key>/encoder/<encoder_id>/session/<session_id>/bandwidth/2025837.m3u8

 

Exclude subtitles

Original manifest with subtitles


#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",LANGUAGE="en",NAME="English",AUTOSELECT=YES,URI="tt-en.m3u8"
#EXT-X-MEDIA:TYPE=SUBTITLES,GROUP-ID="subs",LANGUAGE="de",NAME="Deutsch",AUTOSELECT=YES,URI="tt-de.m3u8"
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="stereo",LANGUAGE="en",NAME="English",DEFAULT=YES,AUTOSELECT=YES,URI="audio.m3u8"
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=889549,RESOLUTION=640x360,CODECS="mp4a.40.2,avc1.4d401f" SUBTITLES="subs"
https://dai.google.com/linear/hls/event/<asset_key>/encoder/<encoder_id>/session/<session_id>/bandwidth/889549.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1406061,RESOLUTION=640x360,CODECS="mp4a.40.2,avc1.4d401f" SUBTITLES="subs"
https://dai.google.com/linear/hls/event/<asset_key>/encoder/<encoder_id>/session/<session_id>/bandwidth/2025837.m3u8

 

Request


https://dai.google.com/linear/hls/event/<asset_key>/master.m3u8?dai-excl=subtitles
 

Response


#EXTM3U
#EXT-X-VERSION:3
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="stereo",LANGUAGE="en",NAME="English",DEFAULT=YES,AUTOSELECT=YES,URI="audio.m3u8"
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=889549,RESOLUTION=640x360,CODECS="mp4a.40.2,avc1.4d401f" SUBTITLES="subs"
https://dai.google.com/linear/hls/event/<asset_key>/encoder/<encoder_id>/session/<session_id>/bandwidth/889549.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1406061,RESOLUTION=640x360,CODECS="mp4a.40.2,avc1.4d401f" SUBTITLES="subs"
https://dai.google.com/linear/hls/event/<asset_key>/encoder/<encoder_id>/session/<session_id>/bandwidth/2025837.m3u8

 
Was this helpful?
How can we improve it?