The element BaseURL syntax rules for MPEG Dash follow RFC 3986, which requires a simple understanding:
I.1 the name of each part of the URI
Foo://example.com:8042/over/there?name=ferret#nose
\_/ \______________/\_________/ \_________/ \__/
| | | | |
Scheme Authority path Query fragment
| _________________________|__
/ \ / \
Urn:example:animal:ferret:nose
Scheme: The name of the agreement, beginning with a letter, followed by an Italian letter / number /+/-/. the combination.
Scheme = ALPHA * (alpha/digit/"+"/"-"/".")
Authority: Starts with a double slash "//" but does not include "//" to immediately follow the first '/' or? or #(# here
Call number sign) ends without including the symbol, or until the URL ends.
authority = [userinfo "@"] host [":" Port]
the part within [] is an optional part.
Path: after authority , begin with / start with the first one immediately after? or # end or until the end of the URL .
Query: with? At the end of the first # , or until the end of the URL ,query often
"Key=value" form to carry some authentication information.
Fragment: Starts with # until the URL ends. Fragment is often used to mark a reference to a primary resource's secondary
Resources.
Reference rules for I.2 URIs
Uri-reference:uri-reference may be a URI or relative-reference , when uri-reference the prefix does not
When matching scheme syntax, it indicates that uri-reference is a relative-reference.
the URI referenced by relative-reference is called the target URI.
In mpeg Dash , it is only necessary to know that BaseURL may need to refer to the ancestor's BaseURL to combine it into a complete The HTTP link can be as follows:
<?xml version= "1.0"?>
<mpd
Xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"
Xmlns= "urn:mpeg:dash:schema:mpd:2011"
xsi:schemalocation= "urn:mpeg:dash:schema:mpd:2011 dash-mpd.xsd"
Type= "Static"
mediapresentationduration= "pt3256s"
Minbuffertime= "Pt1.2s"
profiles= "urn:mpeg:dash:profile:isoff-on-demand:2011" >
<BaseURL>http://cdn1.example.com/</BaseURL>
<BaseURL>http://cdn2.example.com/</BaseURL>
<Period>
<!--中文版 Audio--
<adaptationset mimetype= "Audio/mp4" codecs= "mp4a.0x40" lang= "en" subsegmentalignment= "true"
subsegmentstartswithsap= "1" >
<contentprotection schemeiduri= "urn:uuid:706d6953-656c-5244-4d48-656164657221"/>
<representation id= "1" bandwidth= "64000" >
<BaseURL>7657412348.mp4</BaseURL>
</Representation>
<representation id= "2" bandwidth= "32000" >
<BaseURL>3463646346.mp4</BaseURL>
</Representation>
</AdaptationSet>
</Period>
</MPD>
The HTTP URL to access two MP4 files requires the combination of the BaseURL in the baseurl and representation in MPD:
Http://cdn1.example.com/7657412348.mp4
Http://cdn1.example.com/3463646346.mp4
Or
Http://cdn2.example.com/7657412348.mp4
Http://cdn2.example.com/3463646346.mp4
Structure of the RFC 3986 URI