Dash-Industry-Forum / dash.js

A reference client implementation for the playback of MPEG DASH via Javascript and compliant browsers.
http://reference.dashif.org/dash.js/nightly/samples/dash-if-reference-player/index.html
Other
5.05k stars 1.66k forks source link

Support Annex I: Flexible Insertion of URL Parameters #4440

Open wilaw opened 3 months ago

wilaw commented 3 months ago

MPEG DASH spec Annex I details support for the flexible Insertion of URL Parameters. Basically, query args can be passed to a manifest and they can be inherited for a selectable set of sub-requests for audio, video, caption and init segments.

Use-case: support for Common Access Token (CAT). A CAT access token can be attached to a manifest URL as a query arg. Via the essential properties, the player can be instructed to add this token to all media object requests. This avoids having to dynamically manipulate every manifest during delivery in order to add the token to each segment template.

Another big use-case would be - SGAI with Alternative MPD Event, to pass through the sessionID. Note that this requires the more flexible ExtUrlQueryInfo support.

Example: manifest URL https://dash.akamaized.net/akamai/bbb_30fps/bbb_30fps_queryargs2.mpd?a=1&b=2

    <EssentialProperty schemeIdUri="urn:mpeg:dash:urlparam:2014" xmlns:up="urn:mpeg:dash:schema:urlparam:2014"> 
        <up:UrlQueryInfo queryTemplate="$querypart$" useMPDUrlQuery="true"/> 
    </EssentialProperty> 

The player should make audio and video segment requests similar to

https://dash.akamaized.net/akamai/bbb_30fps/bbb_30fps_480x270_600k/bbb_30fps_480x270_600k_0.m4v?a=1&b=2 https://dash.akamaized.net/akamai/bbb_30fps/bbb_30fps_1280x720_4000k/bbb_30fps_1280x720_4000k_1.m4v?a=1&b=2 https://dash.akamaized.net/akamai/bbb_30fps/bbb_a64k/bbb_a64k_2.m4a?a=1&b=2

Note that Annex I is quite a complex set of features, with the ability for the essential property to specify template-based query arg creation, as well as filtering of which requests should include the URL parameters. For simplicity, it might be acceptable to initially only support the following UrlQueryinfo element:

<up:UrlQueryInfo queryTemplate="$querypart$" useMPDUrlQuery="true"/>

This defaults to adding all query args on the manifest to all subrequests, which is a generally use form which would allow CAT use cases to be demonstrated. Then in a subsequent release, support for ExtUrlQueryInfo could be added to enable the SGAI use-case. We should debate this with the Ad insertion TF at DASH IF as they may insist on support of the full Annex from the beginning.

tobbee commented 2 months ago

I made a corresponding ticket for livesim2 that could be done in parallel: https://github.com/Dash-Industry-Forum/livesim2/issues/176