-
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] Support negative @r in SegmentTimeline #1787
Comments
This is something we'd need to add support for. Marking as an enhancement. It should be noted that this kind of manifest is pretty obscure. I'm fairly sure they could just omit the
As an aside, I notice you've filed a few bugs about obscure DASH manifests. What's the actual use case your developing for? The DASH spec is so broad it's not generally a sane goal to play arbitrary DASH manifests. Pretty much every service provider generating DASH manifests will do so according to a significantly more constrained (and sensible!) DASH profile. |
Hi, |
No worries, and thanks. Please do continue to report edge cases as you find them. It's useful to know of cases we don't support even if we decide that we don't want to support them. For this one, we will aim to support the case, but it's low priority since I'm not aware of any providers who are generating this style of manifest in production. |
Hi, I have met the same problem. Thanks. |
You can definitely omit the SegmentTimeline. There is no requirement for one to be present and there's typically only value in including one if some segments are of different duration than others. We're aware that r=-1 is valid according to the spec, as already indicated above. We will get around to fixing it at some point, but would still advise omitting SegmentTimeline in the case where all segments are of equal duration, since its inclusion in unnecessary. |
As an encoder implementer, we don't think that this is an obscure feature. For live events in particular, we have to cope with gaps or missing frames. This can result in varying duration segments if the missing frames occur at the segment boundary. Akamai require their qualified encoders to wait up to 30s per MPD update, and it seems the negative r value is the most efficient way to handle this situation. Also note that although this is an optional item in the DASH spec, this surely is only optional to encoders/packagers. Decoders/players should implement the whole spec, although I can see that you need to prioritise the order you implement the required features. |
It's not particularly viable to implement the whole DASH spec. It's also not a great way to invest time because it contains a long tail of features that are rarely used. I don't think I fully understand the case you describe, because I don't see that missing frames would result in the segment duration changing. Every time you shorten the duration of a segment the player will move slightly closer to the live edge, because you're misrepresenting time. That would most likely have undesirable consequences (e.g. the player will end up maintaining a smaller buffer than it intended). It seems preferable to have a segment with the correct real-time duration that has some frames missing. I'm also not sure how |
Note: I've also seen quite a few providers generating live stream MPDs that use only SegmentTemplate and so have a completely fixed segment duration. Which suggests this is not an insurmountable problem. |
Support was added in #6286. |
Hi,
when trying to parse this .mpd playlist from DashIf test vectors :
http://dash.edgesuite.net/dash264/TestCases/2c/qualcomm/1/MultiResMPEG2.mpd
the negative @r in
<SegmentTimeline><S d="24576" r="-1" />
gives me an empty list of representation
method
getFirstSegmentNum()
returns 1but trying to access a representation causes
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
The specs say :
How could I deal with that ?
Manually editing the playlist and replacing "r=-1" by the actual number of chunks works fine, but obviously I can't rely on that.
Thanks !
The text was updated successfully, but these errors were encountered: