-
Notifications
You must be signed in to change notification settings - Fork 6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DASH: Make use of multiple BaseURL elements, where more than one is defined. #771
Comments
What would you expect the client to do with them? All the specification says is: "In the absence of other criteria, the DASH Client may use the first BaseURL element as base URI". |
It also says
So if multiple alternative base URLs are indicated (as I understood, by declaring them in the same element / on the same level), the client could e.g. start with any base URL, and try another base URL if it can't get a segment from the previous one. This is of course an effort vs. sophistication thing. |
It kind of depends what "other criteria" is supposed to mean. The fact that the specification doesn't define what these criteria should be kind of indicates that the criteria should be specific to the server-side streaming infrastructure (e.g. YouTube may have different criteria to an application using Akamai's CDN). Obviously we don't know the specifics, so we need to either implement something generic enough to be sensible for all infrastructures, or make it pluggable, or do nothing. For now, I think we're fine just using the first BaseURL. Which we don't currently do, since the current code will end up picking the last one. I'll fix this. |
I totally agree about the infrastructure dependencies. And creating a small generic interface for multiple base URLs would be very nice, such as offering multiple base URLs in |
This is on my plate as well right now. If there's any more input on this I'll gladly take it. In our case we want to be able to failover to another CDN if necessary. But I prefer to implement it such that it can go upstream rather than just fork and hack. |
It picks the first one for the load and if there is a timeout it tries the other base URLs sequentially ? (ideally be based on latency imo) |
I was thinking of having the failover logic to be an application specific implementation. Maybe with some sane default to use though. I, for instance, have a pretty specific kind of behavior I want to add but I don't necessarily want to enforce it on everyone. |
@ojw28 Do you have any input on this? Making this pluggable is not trivial since segmentBase and initilizationUri both creates the baseUrl during mpd parsing. I'm currently experimenting with having a list of baseUrls in these to see where I get. But my approach to solve this might differ significantly depending on the likeliness of getting such change merged upstream since I want to diverge from upstream/master as little as possible. |
@pakerfeldt I also implemented a list of baseUris in the RangedUri class, and all the necessary parsing, recently. I will update this and push it to a fork, so you can have a look if you want to. |
Created a pull request for this (#1250). I guess the ideal solution would be to modify the
|
I hacked away this afternoon and ended up with something similar to what you have @Bastian35022. It's not very well thought through. I just did minimal work to get something close to what I need. I wrote a However, it's crucial for me to get this upstream. I don't want this kind of modification locally since it would make future exoplayer bump a big PITA. In that case, I would prefer hooking up an interceptor to OkHttp to solve the problem. |
And here's my current work in progress: pakerfeldt@291aea5 |
Looks good in principle i think. It seems though, that we have a different understanding on how alternative base Urls are signaled in the MPD. Unfortunately, the spec is not 100% clear on how this should be signaled. The most reliable info i could find on this is http://www-itec.uni-klu.ac.at/dash/?page_id=958, with some example MPDs. There, multiple locations are signaled using multiple BaseUrl elements on the same level. In your case, the baseUrls from different levels are assembled, and while that might also be valid, it gets tricky to still support proper reference resolution as well i think. Do you need to support this kind of MPD layout? |
At this point, I didn't really care how it was implemented since I only had multiple BaseUrls on the same level (Period in my case). But looking at
This is still not super clear. Strictly reading, to me this sounds like URLs at each level should only be resolved using BaseUrls on the same level. BaseUrls themselves however, should use the resolved BaseUrl on the level above. However, that would mean we would not be able to resolve URLs on a level where a BaseUrl has not been specified, which of course doesn't make sense. That leads to the question: Should URL resolving on one level always be allowed to use BaseUrls on the level above or only if that level does not contain any BaseUrls already? I guess it could be argued that the lack of BaseUrls on a level could be considered as one single relative BaseUrl containing the empty string "", thus inheriting BaseUrls on the level above. As an example:
|
I agree about the inheritance, and about it being unclear. How about doing it like this then:
|
I agree with the first three bullets, and that's pretty much how my example table behaves, right? However, to your last point, why not let all relative I made a simple |
The reason was to avoid the implementation effort, and because i can't imagine someone actually mixing |
That part of the implementation was actually very straight forward. I will smoothen the commits out and create a PR for us to review and reason around. |
Looks good! |
And here it is: #1259 |
We're merging a change into |
Issue: #771 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=138399124
Checking in on this feature request. How is the priority on this issue? Is it somewhere on your road map? |
Hi, checking in here as well. Is it possible for you to squeeze this feature in some time soon? |
Hi, checking in here as well. According to the document "DASH-IF Interoperability: Guidelines for implementations v4.1", section "4.8.2.1 General Robustness": "Similarly, if the DASH access client receives an HTTP client error (i.e. messages with 4xx Is there any intention to implement this behavior in a future Exoplayer version? |
Hi, any news regarding this feature of having multiple BaseURL on the manifest? |
Hi guys, I probably have one issue with multiple baseURL in the downloads / offline feature.
randomly select URL but just one Is downloaded / cached. Or I'm overlooking something? |
Thanks for reporting. I created #9370 to track this. We need to have a way to make the choice of the base URL deterministic at download and playback time. |
Hi, it's me again... I probably don't understand correctly how it works with multiple
but this will be applied for all next sets and in the case when the MPD playlist contains "just" two
as
and the audio |
If there is a load error with the current base URL, all base URLs with the same priority or service location are excluded. The next time a base URL needs to be selected, the selection only considers the base URLs that are not yet excluded. For your example this means, if there are only two base URLs, then only one base URL can be excluded. If after this, another load error for audio segments occurs that tried loading from the new base URL, then there is no further fallback available. However, the scenario you are describing looks like you were hit by a bug that called the What is the problem you are experiencing? Can you give me some more details or try with the fix from above in |
Heh, thank you. I tried the build from dev-v2 and that fixed my issue. |
From what i saw, the BaseURL element in the DASH MPD is generally supported by the ExoPlayer. However, it does not seem to support multiple/alternative segment locations, as described in ISO/IEC 23009-1:2014 5.6.5. Do you plan on adding this?
The text was updated successfully, but these errors were encountered: