Segment template formatting¶
The implementation is based on Template-based Segment URL construction described in ISO/IEC 23009-1:2014.
$<Identifier>$ | Substitution parameter | Format |
---|---|---|
$$ | is an escape sequence, i.e. “$$” is replaced with a single “$”. | Not applicable. |
$Number$ | This identifier is substitued with the number of the corresponding Segment. | The format tag may be present. If no format tag is present, a default format tag with width=1 shall be used. |
$Time$ | This identifier is substituted with the value of the SegmentTimeline@t attribute for the Segment being accessed. Either $Number$ or $Time$ may be used but not both at the same time. | The format tag may be present. If no format tag is present, a default format tag with width=1 shall be used. |
Note
Identifiers $RepresentationID$ and $Bandwidth$ are not supported in this version. Please file an issue if you want it to be supported.
In each URL, the identifiers shall be replaced by the substitution parameter per the definition in the above table. Identifier matching is case-sensitive.
Each identifier may be suffixed, within the enclosing ‘$’ characters, with an additional format tag aligned with the printf format tag as defined in IEEE 1003.1-2008 following this prototype:
%0[width]d
The width parameter is an unsigned integer that provides the minimum number of characters to be printed. If the value to be printed is shorter than this number, the result shall be padded with zeros. The value is not truncated even if the result is larger.
Strings outside identifiers shall only contain characters that are permitted within URLs according to RFC 3986.