[vlc-devel] upgrade MPEG DASH handling of relative URLs
bob.forsman at ericsson.com
Wed Feb 15 17:30:25 CET 2012
> From: Christopher M?ller <christopher.mueller at itec.uni-klu.ac.at>
> To: "'Mailing list for VLC media player developers'"
> <vlc-devel at videolan.org>
> Subject: Re: [vlc-devel] upgrade MPEG DASH handling of relative URLs
> So if give it a second look maybe it was too late last night ;). It should
> work also with mpds where the segments contain absolute urls due to
> But it would be better to solve this special case in the HTTPConnection
> parseUrl. There you can prove if the url is valid and if not you can set it
> relative. This is one if/else and would work for every profile and also for
> further profiles.
I'm having difficulty imagining how this would work. How many
HTTPConnections does the DASH module use? Does it use one per
Representation? (because there could theoretically be a different
BaseURI for each Representation). If so, then loading the BaseURI into
the HTTPConnection could make sense.
If HTTPConnections are not per-Representation, then the BaseURI would
have to be provided along with the possibly-relative SegmentURL at media.
In that case, my architectural sense tells me to Refactor->"extract
parameter" and let the HTTPConnection operate on absolute URLs.
> Another problem is that baseurls could also occur on more
> levels in the future and must not contain a protocol. The url will then be
> resolved as a concatenation of this baseurls and the segment.
I would not use the word "concatenation", since relative URI resolution
can involve a bit more than concatenation.
Right now the DASH module does not appear to support anything other
than MPD.BaseURL, SegmentInfoDefault.BaseURL, SegmentInfo.BaseURL (and
SegmentInfo and SegmentInfoDefault are not documented in ISO DIS
23009-1), and my project does not need support for BaseURLs.
As developers add support for the other BaseURLs noted in ISO DIS
23009-1 section 5.6, I would recommend that each nesting layer be
prepared to perform full RFC3986 section 5.2 resolution because I
haven't yet found a sentence in ISO DIS 23009-1 section 5.6 that
prohibits protocol/schemes in nested BaseURLs. The one sentence that
does stand out to me is:
" If only relative URLs are specified and the document base URI cannot
be established according to RFC3986 then the MPD should not be
That leads me to conclude that absolute URLs can be specified, and I
see no reason to restrict absolute URLs to appearing only in the
MPD.BaseURL since once you have logic to perform RFC3986 resolution,
you might as well apply it everywhere it makes sense.
In the short term my concern is upgrading the VLC MPEG DASH module to
support my MPDs which legally omit BaseURL tags altogether, while
preserving its ability to interpret the also-legal MPDs generated by
the main DASH team. The coder who gets around to adding support for
all the other legal <BaseURL>s can consider my reasoning above.
More information about the vlc-devel