Override stream parameters

Overriding stream parameters is optional, and available should you want the player or application to override a default value of a stream creation parameter, or override the selection or default order of variants when the HLS or DASH playlist is requested. You can pass these parameters from the player or app for IMA SDK, Server-Side Beaconing (SSB), and DAI API implementations.

You can also override other default ad tag parameters.

Override variant selection and order

The default playlist order is determined by the publisher. If no ordering parameters are specified, the playlists are returned in the original order, as returned by the publisher.

You can override the variant selection and order parameters specified during stream creation, which 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. This may be useful if you would like a specific variant to take precedence over another based on the user consuming the content.

The subset and order of variants remain the same for the life of the stream. The parameters are accepted either as part of the adTagParameters structure when using the IMA SDK, DAI API parameters, or as additional HTTP GET parameters when using SSB.

Parameter Streaming protocol Description Examples
dai-ot
                         
HLS

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 HLS

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 HLS, DASH 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 HLS, DASH 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 HLS 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 HLS, DASH Renditions to be excluded from the playlist. Supports subtitles, codec, audio-lang, subtitle-lang, and iframe. You can exclude audio codecs, video codecs, and audio and/or subtitle languages using a single value or a comma-separated list of multiple values.

dai-excl=subtitles
dai-excl=iframe


Single codec
dai-excl=codec:ec-3

Multiple codecs
dai-excl=codec:ec-3,codec:ac-3


Single language audio
dai-excl=audio-lang:en

Single language subtitle
dai-excl=subtitle-lang:en

Multiple selections
dai-excl=audio-lang:en,
audio-lang:es,
subtitle-lang:en,
subtitle-lang:es

Other override parameters

Parameter Streaming protocol Description Examples
dai-ah HLS, DASH Specifies whether a live stream should have ad holiday applied or not. An ad holiday duration must be specified in the live stream. Enable ad holiday:
dai-ah=1
dai-dvr HLS, DASH The DVR duration (in seconds) of live content and ads that the user can scroll back and maintain seamless playback. 

The current default for this value is 100 seconds, or the value that is specified during live stream setup. However, a new maximum can be specified for each live stream, up to 100 seconds for SSB, or 1800 seconds when using the SDK or API. If you want a larger DVR duration, contact your account manager.

Guidance and usage

The actual DVR duration of the playlist being returned may be slightly more or less depending on the duration of the underlying segments. It may also be slightly different across variants.

The maximum value of the actual window should not be greater than the DVR window value specified in the event. If it is, the value will be capped automatically. DVR windows for SSB streams are also capped to a lower value compared to SDK or Public API streams.

While we do our best to return a compatible manifest, specifying a very small or very large value can cause issues in playback. Playback should be thoroughly tested with the desired DVR window duration to ensure everything is working properly.

Avoid using differing windows across devices. Specifying a window size of 30 seconds for one device versus 31 seconds or 35 seconds for other devices is not suitable from a performance perspective. Instead, use buckets of windows (for example, 35 seconds for one set of devices, 10 minutes another set, etc.). This allows for a more efficient resource allocation and performance.

dai-dvr=60

Parameter override 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

 
Exclude codecs

Original manifest with ac-3, eac-3


#EXTM3U
#EXT-X-STREAM-INF:BANDWIDTH=6107776,RESOLUTION=1920x1080,CODECS="avc1.640028,ec-3",AUDIO="AUDIO-EAC3"
https://truman.com/ssai/hls/event/<event_code>/encoder/<encoder_id>/session/<session_id>/bandwidth/6107776.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2212301,RESOLUTION=960x540,CODECS="avc1.640028,ec-3",AUDIO="AUDIO-EAC3"
https://truman.com/ssai/hls/event/<event_code>/encoder/<encoder_id>/session/<session_id>/bandwidth/2212301.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=6295776,RESOLUTION=1920x1080,CODECS="ac-3,avc1.640028",AUDIO="AUDIO-AC3"
https://truman.com/ssai/hls/event/<event_code>/encoder/<encoder_id>/session/<session_id>/bandwidth/6295776.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2400301,RESOLUTION=960x540,CODECS="ac-3,avc1.640028",AUDIO="AUDIO-AC3"
https://truman.com/ssai/hls/event/<event_code>/encoder/<encoder_id>/session/<session_id>/bandwidth/2400301.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=6045381,RESOLUTION=1920x1080,CODECS="avc1.640028,mp4a.40.2",AUDIO="AUDIO-AAC"
https://truman.com/ssai/hls/event/<event_code>/encoder/<encoder_id>/session/<session_id>/bandwidth/6045381.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2149906,RESOLUTION=960x540,CODECS="avc1.640028,mp4a.40.2",AUDIO="AUDIO-AAC"
https://truman.com/ssai/hls/event/<event_code>/encoder/<encoder_id>/session/<session_id>/bandwidth/2149906.m3u8
#EXT-X-MEDIA:TYPE=AUDIO,URI="audio-eac3.m3u8",GROUP-ID="AUDIO-EAC3",LANGUAGE="en",NAME="ENGLISH",AUTOSELECT=YES
#EXT-X-MEDIA:TYPE=AUDIO,URI="audio-ac3.m3u8",GROUP-ID="AUDIO-AC3",LANGUAGE="en",NAME="ENGLISH",AUTOSELECT=YES
#EXT-X-MEDIA:TYPE=AUDIO,URI="audio-aac.m3u8",GROUP-ID="AUDIO-AAC",LANGUAGE="en",NAME="ENGLISH",AUTOSELECT=YES

 

Exclude one codec

Request


http://truman.com/ssai/event/<event_code>/master.m3u8?dai-excl=codec:ec-3
 

Response


#EXTM3U
#EXT-X-STREAM-INF:BANDWIDTH=6295776,RESOLUTION=1920x1080,CODECS="ac-3,avc1.640028",AUDIO="AUDIO-AC3"
https://truman.com/ssai/hls/event/<event_code>/encoder/<encoder_id>/session/<session_id>/bandwidth/6295776.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2400301,RESOLUTION=960x540,CODECS="ac-3,avc1.640028",AUDIO="AUDIO-AC3"
https://truman.com/ssai/hls/event/<event_code>/encoder/<encoder_id>/session/<session_id>/bandwidth/2400301.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=6045381,RESOLUTION=1920x1080,CODECS="avc1.640028,mp4a.40.2",AUDIO="AUDIO-AAC"
https://truman.com/ssai/hls/event/<event_code>/encoder/<encoder_id>/session/<session_id>/bandwidth/6045381.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2149906,RESOLUTION=960x540,CODECS="avc1.640028,mp4a.40.2",AUDIO="AUDIO-AAC"
https://truman.com/ssai/hls/event/<event_code>/encoder/<encoder_id>/session/<session_id>/bandwidth/2149906.m3u8
#EXT-X-MEDIA:TYPE=AUDIO,URI="audio-ac3.m3u8",GROUP-ID="AUDIO-AC3",LANGUAGE="en",NAME="ENGLISH",AUTOSELECT=YES
#EXT-X-MEDIA:TYPE=AUDIO,URI="audio-aac.m3u8",GROUP-ID="AUDIO-AAC",LANGUAGE="en",NAME="ENGLISH",AUTOSELECT=YES

 

Exclude multiple codecs

Request


http://truman.com/ssai/event/<event_code>/master.m3u8?dai-excl=codec:ec-3,codec:ac-3
 

Response


#EXTM3U
#EXT-X-STREAM-INF:BANDWIDTH=6045381,RESOLUTION=1920x1080,CODECS="avc1.640028,mp4a.40.2",AUDIO="AUDIO-AAC"
https://truman.com/ssai/hls/event/<event_code>/encoder/<encoder_id>/session/<session_id>/bandwidth/6045381.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2149906,RESOLUTION=960x540,CODECS="avc1.640028,mp4a.40.2",AUDIO="AUDIO-AAC"
https://truman.com/ssai/hls/event/<event_code>/encoder/<encoder_id>/session/<session_id>/bandwidth/2149906.m3u8
#EXT-X-MEDIA:TYPE=AUDIO,URI="audio-aac.m3u8",GROUP-ID="AUDIO-AAC",LANGUAGE="en",NAME="ENGLISH",AUTOSELECT=YES

 
Was this helpful?
How can we improve it?