Skip to content
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

Live stream mis-detected as IPR due to period durations #1148

Closed
sandersaares opened this issue Nov 22, 2017 · 5 comments
Closed

Live stream mis-detected as IPR due to period durations #1148

sandersaares opened this issue Nov 22, 2017 · 5 comments
Assignees
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@sandersaares
Copy link
Contributor

sandersaares commented Nov 22, 2017

Have you read the FAQ and checked for duplicate issues:
yes

What version of Shaka Player are you using:
2.2.6-debug

Can you reproduce the issue with our latest release version:
Unknown, used demo app

Can you reproduce the issue with the latest code from master:
Unknown, used demo app

Are you using the demo app or your own custom app:
Demo app

If custom app, can you reproduce the issue using our demo app:
N/A

What browser and OS are you using:
Chrome 62, Windows 10

What are the manifest and license server URIs:
https://media.axprod.net/PublicVideos/LiveDashWithDuration/Manifest.mpd

No segments, just manifest. Should be enough, I hope.

What did you do?
Press Load to start playback

What did you expect to happen?
Playback attempts to start, no errors reported.

What actually happened?
presentation_timeline.js:344 Assertion failed: Detected as IPR stream, but does not match our model of IPR!

The logic in that method appears to assume that the following combination of factors is never true:

  • The packager knows the duration of all data in the manifest.
  • Segments are only available for a limited time.

However, this is not necessarily true for all live presentations.

In my scenario here, the packager assembles a presentation from periods of known duration, adding/extending periods as time goes on. The example URL above is a manifest with 2 periods, both of which have a known duration. Yet at the same time it is a live presentation - more periods may be added later, or the duration of the existing last period extended, with the data available only for a limited time.

I would expect the duration to be ignored in this case (assuming the player does not need it in its timing logic) and the presentation to be played back the same as it would if the presentation (or last period) duration were not specified. That is what happens as far as I can tell (my content works, only the assert complains).

From what I read, this content conforms to DASFH-IF IOP and DASH - there are various stipulations about when a duration is needed (none of which apply) but nothing seems to forbid it being present in the scenario described above.

@TheModMaker
Copy link
Contributor

I don't think changing the duration of a Period is allowed. If the manifest specifies that the Period has a duration of some value, it must always have that duration. You can either add new Periods with the new content or you can simply drop the duration.

The problem is that when there is a duration, we treat it as an in-progress recording, which has different semantics than a live stream. This should probably be treated as a live stream and not an in-progress recording. I think the problem is that we will calculate the duration of the presentation based on the sum of Period lengths. Since all your Periods have a duration, we are able to calculate the duration of the presentation. We should probably update it so it doesn't calculate the duration on live streams, it should only use the mediaPresentationDuration attribute.

@TheModMaker TheModMaker self-assigned this Nov 22, 2017
@TheModMaker TheModMaker added the type: bug Something isn't working correctly label Nov 22, 2017
@TheModMaker TheModMaker added this to the v2.3.0 milestone Nov 22, 2017
@sandersaares
Copy link
Contributor Author

sandersaares commented Nov 22, 2017

I don't think changing the duration of a Period is allowed.

Well, DASH itself says very little about what is allowed in this case ("If MPD@type is set to 'dynamic', the MPD may be updated during the Media Presentation." is the core of it, which I would agree is so vague as to be useless).

IOP says in 4.3.2.2.4 the following which I think applies here:

Note: An MPD update may extend the Period end time of the last regular Period. For details refer to section 4.4.

B.1.6 also describes a use case of known duration that is extended (though I would agree to it being too vague to base any decisions on).

This should probably be treated as a live stream and not an in-progress recording.

Just for my education, can you describe the difference between these cases, from a player viewpoint? I am curious what behavior is different between these cases in terms of user-visible behavior.

@TheModMaker
Copy link
Contributor

An in-progress recording is just like the name suggests, a VOD stream that isn't fully available yet. We treat it as a live stream until it is done recording, then it is a VOD stream. The main features are that it appears live at first (it has an update period, AST, updating segment list) but has a known duration and has an infinite availability (since it should be VOD). We use the live+duration to signal this type of manifest.

This type of manifest isn't really different than a live stream, but it can change the UI. For example, the seek window will be increasing in size and the times will start at 0 rather than showing a negative time relative to the live edge, like in live streams.

@TheModMaker
Copy link
Contributor

Note that even with my proposed fix, the live stream won't play. I think the problem is the same as #1105.

@joeyparrish joeyparrish changed the title My packager sometimes knows the duration of a live stream Live stream mis-detected as IPR due to period durations Nov 22, 2017
@joeyparrish
Copy link
Member

Fix cherry-picked for v2.2.7.

joeyparrish pushed a commit that referenced this issue Nov 27, 2017
We shouldn't use the sum of Period durations to detect the duration of
live streams.  It is possible for Periods to be added or the duration
to change, so the sum of Period durations is only valid for VOD.

Closes #1148

Change-Id: I53846807d18b97b0127eb75bb83be526eb7095ee
@shaka-project shaka-project locked and limited conversation to collaborators Mar 22, 2018
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Apr 15, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
Development

No branches or pull requests

4 participants