Closed mad-gooze closed 2 years ago
We are using this patch https://gist.github.com/toshic/ff57c9004fdc18010894bfb86daf86de to fix this issue in our build now.
Maybe there is a better solution for that?
First, the <Location>
element only specifies where to query the MPD, not really where the segments are. However, it comes up when the segment URLs are relative, then they are relative to the <Location>
. The URLs in your manifest are absolute, so that is the URL we fetch. <BaseURL>
specifies where to fetch the segments and shouldn't be changed.
If this isn't the correct interpretation of the elements, can you point to where in the DASH spec it specifies that <Location>
should change <BaseURL>
? The only references to <Location>
I see are when referring to manifest updates.
If segments url is relative it should be resolved from <BaseURL>
The problem is that after manifest is updated with a new <BaseURL>
, segments url are still resolved from old <BaseURL>
.
this is described in https://dashif.org/docs/DASH-IF-IOP-v4.3.pdf 3.2.15. MPD Location and Reference Resolution
So the problem is that the new manifest specifies different URLs for segments than the original? So the first manifest looks like this:
<Location>
: https://test.org/foo.mpd
<BaseURL>
: https://livesim.dashif.org/base
Segent: init.mp4
This results in fetching a segment for https://livesim.dashif.org/base/init.mp4
. Then we update the manifest by making a request to https://test.org/foo.mpd
which results in the following:
<Location>
: https://test.org/foo.mpd
<BaseURL>
: https://test.org/base
Segent: init.mp4
Which should result in a segment request to https://test.org/base/init.mp4
. Is this your situation? In your original question the two manifests you post both have the same <BaseURL>
so we would resolve the segments the same way.
If that's the case, I think the problem has to do with how we merge segments here. We just use the old segments if the times match, but if the URLs change, we will still fetch the old segments. Note that this is allowed by the DASH spec since the segments at the old URL need to remain valid until they fall outside the availability window. Even if we change this, we may fetch the old URL for a few segments after the update.
Which should result in a segment request to https://test.org/base/init.mp4. Is this your situation?
Correct! Now shaka ignores <BaseURL>
update and still fetches segment from https://livesim.dashif.org/base/init.mp4
Ok. So I'm marking this as a bug since what we are doing is less than ideal. But I've put this on the backlog since we are already behind v2.5 and v2.6 has already been scheduled and doesn't fit in. If you need this fixed sooner, we'd be happy to review a PR based on my comment above.
@mad-gooze Can you check if it happens with version 4.0.0?
Closing due to inactivity. If this is still an issue for you or if you have further questions, the OP can ask shaka-bot to reopen it by including @shaka-bot reopen
in a comment.
Have you read the FAQ and checked for duplicate open issues? Yes
What version of Shaka Player are you using? 2.4.6
Can you reproduce the issue with our latest release version? Yes
Can you reproduce the issue with the latest code from
master
? Have not tried yetAre you using the demo app or your own custom app? This can be reproduced with demo app
If custom app, can you reproduce the issue using our demo app?
What browser and OS are you using? Latest stable chrome, macos or windows
For embedded devices (smart TVs, etc.), what model and firmware version are you using?
What are the manifest and license server URIs?
I use http://livesim.dashif.org/livesim/testpic_2s/Manifest.mpd and mock mpd with proxy.
What did you do?
Add
<Location>
tag to the mpd like thisMock http://test.org/livesim/testpic_2s/Manifest.mpd using proxy to answer the following MPD (it has BaseURL pointing to test.org):
What did you expect to happen? I expect that after switching location new segments are fetched from test.org
What actually happened? Segments are fetched from livesim.dashif.org - BaseUrl is not changed which should be done according to spec. Dash.js player changes BaseUrl in this case.