-
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] Possible improvement to detecting end of live events #4780
Comments
If the stream is actually finished, I'd assume that you receive an |
@tonihei - Here is the test url - https://content.downlynk.com/channel/29e9c85c070f413fb71a3b2a39eed208.mpd?xtest=end30&prettydash=1 |
@tonihei @ojw28 The lack of a minimumUpdatePeriod on a dynamic manifest, and the addition of MPD presentation duration. Please suggest if this doesn't make sense or there is some other standard way of handling this.Thanks. |
I think you should be turning |
Yes, that is what I was looking for. We only use the |
Thanks @ojw28 @tonihei for the quick response. Having Any suggestions on detecting live streaming in this case. Currently we use |
It's probably better just to check for For the ended live stream case, it's slightly unclear how they differ from non-live streams from a player point of view. Both have a non-changing manifest. If your live streams usually only have a part of the period available, you could check for a non-zero offset in |
I think I found one issue. I have one URL where the way a presentation ends is by signalling inband via emsg box in fmp4 . I see that the player is detecting the end of presentation, but is trying to either retry, or after max retry is over, throw a DashManifestStaleException. IMO, if dynamicMediaPresentationEnded is true, there is no need to retry, and instead it should take the player to ENDED state. So this check needs to be re-looked. |
If the presentation end has been signalled in-band, then shouldn't any attempt to request the manifest result in a static manifest being received? In which case you'd never hit the code paths you reference. It sounds more likely that the server is not updating the manifest to be static, which I think it should do. |
I don't think so. I'm trying to find if the spec mentions that explicitly or not. My high level understanding from the spec is that, a static MPD is primarily used for for a VIdeo-on-Demand, whereas Dynamic MPD is used for Live streaming, which can end, but not necessarily be streamed as VOD later. I've sent the sample content URL to the email id. Section 4.5.2.1 says |
Are you removing It's definitely not sufficient to only signal with an in-band message IMO. Reopening primarily to consider the |
The manifest finalizes the duration by adding mediaPresenationDuration and the duration of the period. However, mininumUpdatePeriod is not removed. The thing is the content does not belong to us. So we don't have control on how it should behave. I'm referring to section 4.5 of https://dashif.org/docs/DASH-IF-IOP-v4.2-clean.htm and it does not specify that that the type of mpd should be changed from dynamic to static for the client to detect end of live event. I've sent the URL to the dev email id |
We'll look into removing the assumption that the type should change from dynamic to static. It looks like removal of It's the responsibility of the content provider to ensure producing compliant content. |
Unfortunately, as per the interopability guidelines , service of type 4.5 " MPD and Segment-based Live Service Offering" - there is no such requirement of removing "minimumUpdatePeriod". On the contrary, it mandates it to be present. |
I did minor changes and looks like we are not able to handle end of live stream. Changes attached. (not sending pull request, since I'm not fully confident of the changes). This is just for discussion. |
We can't rely on the in-band message to determine whether the presentation has ended. You must be able to tell only from the manifest. Suppose the client hasn't requested any segments yet. If it can't tell that the presentation has ended from the manifest, it will likely try and request segments that don't exist. If we inferred the presentation has ended only based on the existence of Does that make sense? And would it work for your case? |
Yeah and that's what I've tried to do in DefaultDashChunkSource i.e depend on mediaPresentationDuration to decide if the playback has ended or not. But for that I had to allow getNextChunk proceed to the part where it sets endofstream flag on the chunk by not forcing a manifest refresh when dynamicMediaPresentationEnded is set to true in PlayerEmsgHandler. Although, to decide if this is the right way to do, we should revisit the spec and make sure that presence of mediaPresentationDuration really means that no more data will be added at the end. (I mean It could also mean that this is the current known duration of the presentation) Finally, to get the player to really go to ENDED state, I had to change the Timeline to static instead of dynamic, and for that I used the in-band message. Perhaps I could use the presence of mediaPresentationDuration itself to set the timeline to static so that there is no dependency on in-band messages. Would that be okay? |
This makes sense. I think more broadly we should probably:
Note step (3) isn't quite correct, because Does the above sound right to you? |
A proposed change that implements the above is here: f70cc75 Could you give that a try with the streams you have, and/or review it for sanity? For (3) I've not used |
[Related internal refs: b/69703223, b/31426754, clipped live streams] |
The proposed change doesn't work. It goes into buffering at the end. The suggestions I gave earlier works. i.e
else if (!dynamicMediaPresentationEnded
out.endOfStream = !manifest.dynamic || (periodIndex < manifest.getPeriodCount() - 1) ||
manifestRefreshNeeded = false; |
As per this comment and in particular the one that follows it, you need to edit the line for (3) to use |
Oh I forgot about that change. I'll do that today and retest. Sorry about that. |
Yes this works. |
Thanks for checking! I'll take a look at splitting the |
It's interesting that section 4.4.3.1 describes |
I've filed https://github.com/Dash-Industry-Forum/DASH-IF-IOP/issues/213 to discuss whether |
The remaining work is to split Window.isDynamic so that it's possible to represent a window that wont be appended to, but may still be removed from. Issue: #4780 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=221439220
This should be fixed in |
The remaining work is to split Window.isDynamic so that it's possible to represent a window that wont be appended to, but may still be removed from. Issue: #4780 ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=221439220
Any pointers to Exoplayer support for detecting when a DASH Live stream has finished.Thanks.
The text was updated successfully, but these errors were encountered: