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

Shaka is trying to download more slices than exist for an ad inserted into a dash live stream #1304

Closed
TheJohnBowers opened this issue Feb 15, 2018 · 16 comments
Labels
status: archived Archived and locked; will not be updated status: bad content Caused by invalid, broken, or unsupported content

Comments

@TheJohnBowers
Copy link
Contributor

TheJohnBowers commented Feb 15, 2018

ManifestRequestsLeadingToShakaDownloadingTooFar.har.zip
Have you read the FAQ and checked for duplicate open issues?:
Yes
What version of Shaka Player are you using?:
I am working out of master currently
Can you reproduce the issue with our latest release version?:
I have only tried master so far.
Can you reproduce the issue with the latest code from master?:
Yes
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?:
NA
What browser and OS are you using?:
Chrome
What are the manifest and license server URIs?:

This is tricky to because I have to setup a live stream with the same repeating ad break, and I don't have the infrastructure set up to do this right this moment.

I will work on doing this, but I am hoping just having the manifest will at least be able to start the conversation. Maybe you see something you think I should be doing in manifest generation for example, although I do feel like this is likely a bug.

What did you do? What did you expect to happen? What actually happened?
I am going to answer all of these questions below:

I play back a live stream successfully until an ad gets inserted. The ad is 73.045 seconds in length and it causes a new period to show up in my presentation. All my adaptation sets use SegmentTemplates with $Number$ expansion to give the names of the segments for download. An example of exactly what that looks like in my presentation is here:

	<AdaptationSet maxFrameRate="60" maxHeight="540" maxWidth="960" mimeType="video/mp4" segmentAlignment="true" startWithSAP="1">
		<Representation bandwidth="905852" codecs="avc1.64001e" frameRate="30" height="320" id="D" scanType="progressive" width="768"> 
			<BaseURL>http://stgec-ausw.uplynk.com/80C078/ausw/slices/dbf/c77021f506ae42c799fe165c9634267e/dbfadbe0446746b080f6d2f7fef4b291/</BaseURL> 
			<SegmentTemplate duration="4096" initialization="$RepresentationID$_init.mp4" media="$RepresentationID$$Number%08d$.m4f" startNumber="0" timescale="1000" /> 
		</Representation> 
	</AdaptationSet>

Since my ad is 73.045 Seconds long and my duration is 4.096 -- Download must stop at D00000017.m4f. Shaka keeps going though and tries to download a D00000018.m4f -- Since this slice doesn't exist playback of course breaks.

So I get a manifest update that shows this upcoming period at 14:57:49 that looks like this:
============Transitioning Into Ad================

	<MPD availabilityStartTime="2018-02-14T21:37:07Z" maxSegmentDuration="PT4.096S" minBufferTime="PT8.00S" minimumUpdatePeriod="PT20.64S" profiles="urn:mpeg:dash:profile:isoff-live:2011" publishTime="2018-02-14T21:57:49Z" suggestedPresentationDelay="PT62S" type="dynamic" xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:cenc="urn:mpeg:cenc:2013" xmlns:ms="urn:microsoft" xmlns:mspr="urn:microsoft:playready"> 
		<Period id="dbfadbe0446746b080f6d2f7fef4b291-1.51864451435e+12" start="PT286.720S"> 
			.... (content period) ....
		</Period> 
		<Period id="338ffab7c2b143e2ba718473ce1a13f3-1.51864540744e+12" start="PT1179.808S">  
	 		.... (ad period) ....
		</Period> 
		<UTCTiming schemeIdUri="urn:mpeg:dash:utc:http-head:2014" value="http://services.uplynk.localhost:8000/misc/servertime" /> 
	</MPD>

============================

Then ~20 Seconds later (at 14:58:09) another manifest update that looks like this - The ad period is the only one now visible:

============Nothing but ad================

	<MPD availabilityStartTime="2018-02-14T21:37:07Z" maxSegmentDuration="PT4.096S" minBufferTime="PT8.00S" minimumUpdatePeriod="PT20.48S" profiles="urn:mpeg:dash:profile:isoff-live:2011" publishTime="2018-02-14T21:58:09Z" suggestedPresentationDelay="PT62S" type="dynamic" xmlns="urn:mpeg:dash:schema:mpd:2011"> 
		<Period id="338ffab7c2b143e2ba718473ce1a13f3-1.51864540744e+12" start="PT1179.808S"> 
			... ad period ... 
		</Period> 
		<UTCTiming schemeIdUri="urn:mpeg:dash:utc:http-head:2014" value="http://services.uplynk.localhost:8000/misc/servertime" /> 
	</MPD>

============================

Then another ~20 Seconds Pass and the manifest is unchanged -- Still only the ad period is visible (at 14:58:30)

============Nothing but ad================

	<MPD availabilityStartTime="2018-02-14T21:37:07Z" maxSegmentDuration="PT4.096S" minBufferTime="PT8.00S" minimumUpdatePeriod="PT20.48S" profiles="urn:mpeg:dash:profile:isoff-live:2011" publishTime="2018-02-14T21:58:30Z" suggestedPresentationDelay="PT62S" type="dynamic" xmlns="urn:mpeg:dash:schema:mpd:2011"> 
		<Period id="338ffab7c2b143e2ba718473ce1a13f3-1.51864540744e+12" start="PT1179.808S"> 
			... ad period ... 
		</Period> 
		<UTCTiming schemeIdUri="urn:mpeg:dash:utc:http-head:2014" value="http://services.uplynk.localhost:8000/misc/servertime" /> 
	</MPD>

============================

Then after another ~20 Seconds we get another update where we can see a new period coming up (at 14:58:50)

============Transitioning out of ad================

	<MPD availabilityStartTime="2018-02-14T21:37:07Z" maxSegmentDuration="PT4.096S" minBufferTime="PT8.00S" minimumUpdatePeriod="PT23.8933333333S" profiles="urn:mpeg:dash:profile:isoff-live:2011" publishTime="2018-02-14T21:58:50Z" suggestedPresentationDelay="PT62S" type="dynamic" xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:cenc="urn:mpeg:cenc:2013" xmlns:ms="urn:microsoft" xmlns:mspr="urn:microsoft:playready"> 
		<Period id="338ffab7c2b143e2ba718473ce1a13f3-1.51864540744e+12" start="PT1179.808S">
			... ad period ...
		</Period> 
		<Period id="dbfadbe0446746b080f6d2f7fef4b291-1.51864451435e+12" start="PT1252.853S"> 
			... content period ...
		</Period> 
		<UTCTiming schemeIdUri="urn:mpeg:dash:utc:http-head:2014" value="http://services.uplynk.localhost:8000/misc/servertime" /> 
	</MPD>

============================

You can see from this last manifest update that the length of the ad period can be determined from the difference in the start times to be 1252.853 - 1179.808 == 73.045 seconds long.

Our numbering starts at 0 and the duration is 4096 with a timescale of 1000 so this requires 18 slices numbered from $RepresentationID$00000000.m4f - $RepresentationID$00000017.m4f

The problem I have is that shaka keeps trying to download a $RepresentationID$00000018.m4f

I cannot see why this would be happening.

According to 4.4.2.2 - "If the Period is the last one in the MPD and the MPD @minimumUpdatePeriod is present, then the time PEwc[i] is obtained as the sum of NOW and the value of MPD @minimumUpdatePeriod

So I the way I understand the spec, the MinimumUpdatePeriod determines the length of that last period - Potentially Extending it over and over again. In my case I am going to have a 73.045 second period, but it increases by at most the minimum update period of ~20 seconds 3 times before a new period shows up to set the absolute length of the period. Since the update happens 3 times with a minimum update period of ~20 seconds each time, shaka should be assuming that period is at MOST 60 seconds long before it sees the next period and can determine the exact length of 73.045 seconds.

Am I doing something wrong here?

I feel like the console error shows pretty obviously what the problem is, but for completeness I am including it here:

VM226 http_plugin.js:111 GET http://stgec-ausc.uplynk.com/80C078/ausc/slices/338/c77021f506ae42c799fe165c9634267e/338ffab7c2b143e2ba718473ce1a13f3/TK_00000018.m4f 403 (Forbidden)
(anonymous) @ VM226 http_plugin.js:111
shaka.net.HttpPlugin @ VM226 http_plugin.js:39
backoffOperation.chain @ VM173 networking_engine.js:471
wrapChainCallback_ @ VM168 abortable_operation.js:221
promise.then @ VM168 abortable_operation.js:182
Promise.then (async)
chain @ VM168 abortable_operation.js:162
shaka.net.NetworkingEngine.send_ @ VM173 networking_engine.js:465
shaka.net.NetworkingEngine.makeRequestWithRetry_ @ VM173 networking_engine.js:415
requestFilterOperation.chain @ VM173 networking_engine.js:328
wrapChainCallback_ @ VM168 abortable_operation.js:221
promise.then @ VM168 abortable_operation.js:182
Promise.then (async)
chain @ VM168 abortable_operation.js:162
shaka.net.NetworkingEngine.request @ VM173 networking_engine.js:327
shaka.media.StreamingEngine.fetch_ @ VM199 streaming_engine.js:2063
shaka.media.StreamingEngine.fetchAndAppend_ @ VM199 streaming_engine.js:1424
shaka.media.StreamingEngine.update_ @ VM199 streaming_engine.js:1167
shaka.media.StreamingEngine.onUpdate_ @ VM199 streaming_engine.js:1053
setTimeout (async)
shaka.media.StreamingEngine.scheduleUpdate_ @ VM199 streaming_engine.js:2120
shaka.media.StreamingEngine.onUpdate_ @ VM199 streaming_engine.js:1055
setTimeout (async)
shaka.media.StreamingEngine.scheduleUpdate_ @ VM199 streaming_engine.js:2120
shaka.media.StreamingEngine.onUpdate_ @ VM199 streaming_engine.js:1055
setTimeout (async)
shaka.media.StreamingEngine.scheduleUpdate_ @ VM199 streaming_engine.js:2120
shaka.media.StreamingEngine.onUpdate_ @ VM199 streaming_engine.js:1055
setTimeout (async)
shaka.media.StreamingEngine.scheduleUpdate_ @ VM199 streaming_engine.js:2120
shaka.media.StreamingEngine.onUpdate_ @ VM199 streaming_engine.js:1055
setTimeout (async)
shaka.media.StreamingEngine.scheduleUpdate_ @ VM199 streaming_engine.js:2120
shaka.media.StreamingEngine.onUpdate_ @ VM199 streaming_engine.js:1055
setTimeout (async)
shaka.media.StreamingEngine.scheduleUpdate_ @ VM199 streaming_engine.js:2120
shaka.media.StreamingEngine.onUpdate_ @ VM199 streaming_engine.js:1055
setTimeout (async)
shaka.media.StreamingEngine.scheduleUpdate_ @ VM199 streaming_engine.js:2120
(anonymous) @ VM199 streaming_engine.js:1444
Promise.then (async)
shaka.media.StreamingEngine.fetchAndAppend_ @ VM199 streaming_engine.js:1434
shaka.media.StreamingEngine.update_ @ VM199 streaming_engine.js:1167
shaka.media.StreamingEngine.onUpdate_ @ VM199 streaming_engine.js:1053
setTimeout (async)
shaka.media.StreamingEngine.scheduleUpdate_ @ VM199 streaming_engine.js:2120
shaka.media.StreamingEngine.onUpdate_ @ VM199 streaming_engine.js:1055
setTimeout (async)
shaka.media.StreamingEngine.scheduleUpdate_ @ VM199 streaming_engine.js:2120
shaka.media.StreamingEngine.onUpdate_ @ VM199 streaming_engine.js:1055
setTimeout (async)
shaka.media.StreamingEngine.scheduleUpdate_ @ VM199 streaming_engine.js:2120
shaka.media.StreamingEngine.onUpdate_ @ VM199 streaming_engine.js:1055
setTimeout (async)
shaka.media.StreamingEngine.scheduleUpdate_ @ VM199 streaming_engine.js:2120
shaka.media.StreamingEngine.onUpdate_ @ VM199 streaming_engine.js:1055
setTimeout (async)
shaka.media.StreamingEngine.scheduleUpdate_ @ VM199 streaming_engine.js:2120
shaka.media.StreamingEngine.onUpdate_ @ VM199 streaming_engine.js:1055
setTimeout (async)
shaka.media.StreamingEngine.scheduleUpdate_ @ VM199 streaming_engine.js:2120
shaka.media.StreamingEngine.onUpdate_ @ VM199 streaming_engine.js:1055
setTimeout (async)
shaka.media.StreamingEngine.scheduleUpdate_ @ VM199 streaming_engine.js:2120
shaka.media.StreamingEngine.onUpdate_ @ VM199 streaming_engine.js:1055
setTimeout (async)
shaka.media.StreamingEngine.scheduleUpdate_ @ VM199 streaming_engine.js:2120
shaka.media.StreamingEngine.onUpdate_ @ VM199 streaming_engine.js:1055
setTimeout (async)
shaka.media.StreamingEngine.scheduleUpdate_ @ VM199 streaming_engine.js:2120
shaka.media.StreamingEngine.onUpdate_ @ VM199 streaming_engine.js:1055
setTimeout (async)
shaka.media.StreamingEngine.scheduleUpdate_ @ VM199 streaming_engine.js:2120
(anonymous) @ VM199 streaming_engine.js:1444
Promise.then (async)
shaka.media.StreamingEngine.fetchAndAppend_ @ VM199 streaming_engine.js:1434
shaka.media.StreamingEngine.update_ @ VM199 streaming_engine.js:1167
shaka.media.StreamingEngine.onUpdate_ @ VM199 streaming_engine.js:1053
setTimeout (async)
shaka.media.StreamingEngine.scheduleUpdate_ @ VM199 streaming_engine.js:2120
shaka.media.StreamingEngine.onUpdate_ @ VM199 streaming_engine.js:1055
setTimeout (async)
shaka.media.StreamingEngine.scheduleUpdate_ @ VM199 streaming_engine.js:2120
shaka.media.StreamingEngine.onUpdate_ @ VM199 streaming_engine.js:1055
setTimeout (async)
shaka.media.StreamingEngine.scheduleUpdate_ @ VM199 streaming_engine.js:2120
shaka.media.StreamingEngine.onUpdate_ @ VM199 streaming_engine.js:1055
VM199 streaming_engine.js:1473 (audio:694) failed fetch and append: code=1001

The entirety of the manifest requests can be seen in the .har attachment if you want to look explicitly at more than what I have outlined above.

@joeyparrish
Copy link
Member

Since my ad is 73.045 Seconds long and my duration is 4.096 -- Download must stop at D00000017.m4f. Shaka keeps going though and tries to download a D00000018.m4f -- Since this slice doesn't exist playback of course breaks.

Okay, that makes sense. I agree with the math.

But since the ad period doesn't have a duration in the manifest, we don't know how that it's 73.045 seconds long until there's another period following it. I'm guessing, but by that time, we may already have tried to buffer that non-existent segment.

Maybe this is a silly question, but if you know the ad period is 73.045 seconds, why not put that in the ad period's duration attribute?

So I the way I understand the spec, the MinimumUpdatePeriod determines the length of that last period - Potentially Extending it over and over again. In my case I am going to have a 73.045 second period, but it increases by at most the minimum update period of ~20 seconds 3 times before a new period shows up to set the absolute length of the period.

I haven't re-read the spec or IOP since we started this conversation, but that's not how we interpret it. We treat minimumUpdatePeriod as how often to update the manifest, period. It doesn't have anything to do with the length of a period.

Now, if we were generating a segment list from SegmentTemplate+duration every time we parsed a manifest update, it might work the way you are suggesting. But instead, we have these functions that calculate segment references on-the-fly:

  let find = function(periodTime) {
    if (periodTime < 0)
      return null;
    else if (periodDuration && periodTime >= periodDuration)
      return null;

    return Math.floor(periodTime / segmentDuration);
  };
  let get = function(position) {
    let segmentStart = position * segmentDuration;
    // Cap the segment end at the period end, to avoid period transition issues
    // in StreamingEngine.
    let segmentEnd = segmentStart + segmentDuration;
    if (periodDuration) segmentEnd = Math.min(segmentEnd, periodDuration);

    // Do not construct segments references that should not exist.
    if (segmentEnd < 0)
      return null;
    else if (periodDuration && segmentStart >= periodDuration)
      return null;

    let getUris = function() {
      let mediaUri = MpdUtils.fillUriTemplate(
          template, id, position + startNumber, bandwidth,
          segmentStart * timescale);
      return ManifestParserUtils.resolveUris(baseUris, [mediaUri]);
    };

    return new shaka.media.SegmentReference(
        position, segmentStart, segmentEnd, getUris, 0, null);
  };

Until the next content period appears, periodDuration here is null, so there is no cap on the segments we think we can find in that period.

All that said, I don't expect we should fail, even if we try to buffer ahead to a non-existent segment. When the new period shows up, ideally, we would recognize that we had buffered to the end of the ad period already, and move on to the next period.

@TheJohnBowers
Copy link
Contributor Author

TheJohnBowers commented Feb 21, 2018

Maybe this is a silly question, but if you know the ad period is 73.045 seconds, why not put that in the ad period's duration attribute?

The answer to that is that I don't know the actual duration when the period starts. In my test case I personally know that I am going to end it at 73.0.45 seconds, but we don't require people signaling an ad break in a stream to tell us exactly when it will end when they start it.

Referring to "Guidelines for Implementation: DASH-IF Interoperability Points" at http://dashif.org/w/2015/04/DASH-IF-IOP-v3.0.pdf

I think section 4.4 actually says it pretty well, and I am leaning on that section quite a bit when it comes to what I am expecting the player to do here. Specifically many of the "Backgrounds and Assumptions" in 4.4.1 hold true in this case.

I haven't re-read the spec or IOP since we started this conversation, but that's not how we interpret it. We treat minimumUpdatePeriod as how often to update the manifest, period. It doesn't have anything to do with the length of a period.

Well, give the name "minimum update period" that makes perfect sense, but my reading of the spec seems to suggest that it also has a dual purpose when the last period in the manifest has an unknown duration.

4.3.2.2.4.
Period Information
Each Period is documented by a Period element in the MPD. An MPD may contain one or more Periods. In order to document the use of multiple Periods, the sequence of Period elements is expressed by an index i with i increasing by 1 for each new Period element. Each regular Period i in the MPD is assigned a
• Period start time PSwc[i] in wall-clock time,
• Period end time PEwc[i], in wall-clock time.
Note: An MPD update may extend the Period end time of the last Period. For details refer to section 4.4.

That last line is the most important one here and has me looking to 4.4

Specifically 4.4.2.2

If the Period is the last one in the MPD and the MPD @minimumUpdatePeriod is
present, then the time PEwc[i] is obtained as the sum of NOW and the value of MPD @minimumUpdatePeriod. Note that with the MPD present on the server and NOW progressing, the Period end time is extended.

So it seems to me in the case of an unknown final period duration, the minimum update period provides a cap on how many segments can be downloaded.

Specifically the way I interpret is this:

I will have a given window of segments I know about on any given MPD update. Say at one point in time I know that one period ends 15 seconds through the window, but I don't have an end time for the second period. I will put the second period in with the appropriate start time and then set the minimum update time to 15 seconds. That 15 seconds should be the cap on the number of segments that a player will download.

So when you say:

Until the next content period appears, periodDuration here is null, so there is no cap on the segments we think we can find in that period.

That feels wrong to me from what I am reading. I don't think it should be uncapped. I believe the min period update is supposed to provide a cap in this instance.

I could put a duration on the final period in the mpd trying to limit what is downloaded before the next update, but that doesn't seem to be the way that the spec says periods of unknown duration should be handled, and I would also have to just keep increasing that duration potentially after every update.

Let me know how you interpret this.

@TheJohnBowers
Copy link
Contributor Author

So I am going to take back the comments I made earlier about having a stream that actually duplicated this easily, as I had a bad time sync server URL that caused me other problems. For now let's just talk about this in terms of the spec and what you have already said about Shaka's behavior (uncapped download), vs what I think the spec says should be happening (cap final period based on minimumUpdatePeriod).

@joeyparrish joeyparrish added type: question A question from the community status: waiting on response Waiting on a response from the reporter(s) of the issue needs triage and removed needs triage type: question A question from the community labels Mar 1, 2018
@joeyparrish
Copy link
Member

At this point, it's difficult to understand what's happening until we can reproduce it locally and debug it directly. Can you provide us with some way to reproduce ths issue?

@joeyparrish
Copy link
Member

We could discuss it from a spec point of view, but that's largely academic if everything plays correctly. A counterexample would be helpful.

@joeyparrish joeyparrish removed their assignment Mar 2, 2018
@TheModMaker
Copy link
Contributor

I would interpret 4.4.2.2 as indicating that NOW is moving forward all the time, independent of the fetch time. NOW refers to the live edge, so it is moving forward as the client clock moves.

From DASH IOP 4.3.2.2.2

  • NOW is a time that is expressing the time on the content server as wall-clock time. All information in the MPD related to wall-clock is expressed as a reference to the time NOW.

So it is the current wall-clock time on the content server, not the fetch time. This is why clock sync is important; both the client and the server need synchronized clocks so we can determine availability consistently.

Also from the DASH spec:

A.3.4 Media Segment list restrictions

The Media Segment List is restricted to a list of accessible Media Segments, which may be a subset of the Media Segments of the complete Media Presentation. The construction is governed by the current value of the clock at the client NOW which is greater than or equal to the FetchTime of the MPD.

@TheJohnBowers
Copy link
Contributor Author

I am having trouble getting a stream that reproduces ONLY that issue, but I have managed to get pretty close with this. There is some additional issues with transitioning between assets, largish gaps, that don't seem to be jumped even with large gap jumping enabled for example, but whenever I reload the MPD it start playing again, which tells suggests to me I am at least pretty close (as in If I start on the period playback will work, but if I am transitioning into it from a previous period it does not).

This asset doesn't ALWAYS show the error the issue with downloading beyond the end of the segment, but it does pretty frequently on asset transition. The error seen as a 403 fetching a segment that doesn't exist because it is beyond the end of the segment, as described by the body of the initial entry to this bug.

This stream inserts a 118 second break every 5 minutes. This break is filled mostly by a movie trailer and then a couple seconds of "Ad Slate".

{
  name: 'Downlynk Dash Live with Ad Breaks - duswqa1',
  manifestUri: 'https://content-duswqa1.downlynk.com/channel/29e9c85c070f413fb71a3b2a39eed208.mpd?ad=dashad', // eslint-disable-line max-len
  encoder: shakaAssets.Encoder.UPLYNK,
  source: shakaAssets.Source.UPLYNK,
  drm: [
    shakaAssets.KeySystem.WIDEVINE,
    shakaAssets.KeySystem.PLAYREADY
  ],
  features: [
    shakaAssets.Feature.MP4,
    shakaAssets.Feature.PSSH,
    shakaAssets.Feature.MULTIKEY,
    shakaAssets.Feature.HIGH_DEFINITION
  ],
  licenseServers: {
    'com.microsoft.playready': 'https://content-duswqa1.downlynk.com/pr',
    'com.widevine.alpha': 'https://content-duswqa1.downlynk.com/wv'
  },
  requestFilter: shakaAssets.UplynkRequestFilter,
  responseFilter: shakaAssets.UplynkResponseFilter
},

@TheModMaker TheModMaker removed the status: waiting on response Waiting on a response from the reporter(s) of the issue label Mar 7, 2018
@TheModMaker
Copy link
Contributor

First, I think the presentationTimeOffset is wrong. You are losing the first segment of the Period because the PTO puts it outside the Period. It also causes a gap before the next content. If I subtract 4096 from each presentationTimeOffset attribute, I get gap-free transitions into and out of the ad.

Second, you are reusing Period@id values. Each Period needs to have a unique ID (or none). If the ad Period has the same ID as one in a previous manifest, we ignore it. Since we don't have the next Period, we extend the ad Period longer than we should, which causes the error. If I ignore the ID, I don't get any playback errors.

I have also occasionally seen the video stop or a black frame on seeks and the video refuses to move forward. This appears to be a DRM problem and I will look into it more.

@TheJohnBowers
Copy link
Contributor Author

Ok, it wasn't clear to me that I should not reuse period ID's - In fact I thought I was supposed to because of what was referred to as "Continuous Period Offering" in the IOP. I made a period ID change (to make period IDs unique) and I think I fixed the PTO issue as well, and now that stream seems to be playing pretty well. I guess what must have been happening was that the second period with a given id was ignored as you suggested and we must have kept downloading slices derived from the first period with a given ID to end up downloading beyond where we should have been. In any case I think that solves my current problem. Thanks!

@TheModMaker TheModMaker added status: bad content Caused by invalid, broken, or unsupported content and removed needs triage labels Mar 8, 2018
@TheJohnBowers
Copy link
Contributor Author

I actually believe it is a bug to drop a period because it has the same identifier btw. I believe the IOP describes valid situations in which this is done in section 3.2.12, but I am more interested in having thing play than in worrying specifically about the spec. So I have changed my periods ids to be unique, now that they are things are playing so I am happy, but you might want to consider that this could be a valid use case.

@joeyparrish
Copy link
Member

If you can recommend a way to disambiguate when period IDs are reused, I would consider it. It's really just about matching the new manifest to the old one on update.

@TheJohnBowers
Copy link
Contributor Author

Well, anytime the period id and the period start time were the same in my content, that meant it was the same period. If the period id was the same and the start time changed, that meant it was a new period, but it was continuous with the previous one that had the same id.

@joeyparrish
Copy link
Member

Hrm... We have someone else asking us to in #1341 to allow the period start time to change, which is apparently allowed by the spec currently. But in Dash-Industry-Forum/DASH-IF-IOP#160, they are discussing disallowing the changing of period start, which would be more practical and in line with our current requirements.

@TheModMaker
Copy link
Contributor

From what I can tell, the Period ID needs to be unique. Section 3.2.12 of the IOP guidelines talks about the AdaptationSet IDs, not the Period IDs. The DASH spec is pretty clear on this in section 5.3.2.2, Table 4.

specifies an identifier for this Period. The identifier shall be unique within the scope of the Media Presentation.

@joeyparrish
Copy link
Member

Okay, that works for me.

@TheJohnBowers
Copy link
Contributor Author

Ok, I misread that. I conceed that it does appear that period ids are required to be unique.

@shaka-project shaka-project locked and limited conversation to collaborators May 7, 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 status: bad content Caused by invalid, broken, or unsupported content
Projects
None yet
Development

No branches or pull requests

4 participants