Subject: [Hls-interest] Playlist delta updates - clarification requested

From: "Law, Will" <[email-masked]>
Date: Fri, 18 Mar 2022 21:38:37 +0000

Playlist delta updates are a really useful feature. As we look to implement them, I had three questions:

1. The spec says that can-skip-until attribute defines a skip boundary that “..  MUST be at least six times the Target Duration”. In the developer docs<https://developer.apple.com/documentation/http_live_streaming/enabling_low-latency_http_live_streaming_hls> we are given a sample playlist as shown below. The target duration is 4s but the skip boundary is only 12s. Should it 24s?
2. If the answer to [1] is yes, then would the delta playlist as shown have add additional segments such that it described at least the last 24s of segments? Currently it only describes 4 complete segments at 4s each and one partially complete segment of 1.3s for a total of 17.3s.
3. What is the rule about how many segments must be described to meet the skip boundary declaration? Is it complete segments or does it take into consideration the partial build of the last segment? Let me illustrate this question with a hypothetical example. Imagine target duration is set to 5s due to some variability in encoding, but most segments are closer to 4s and skip boundary is set to 30s. As we deliver the first part of a new segments, should we list the last 7 segments (for a total of 4x7 = 28s) or 8 segments (32s) ? The rule to describe at least a skip-boundary worth of time suggests we should list the last 8 segments and then replace the rest with the #EXT-X-SKIP:SKIPPED-SEGMENTS tag. However if we went with 7 complete segments, then 2s in to the next segment we would actually be meeting our requirement of 30s. This would mean the playlist would suddenly switch to a different SKIPPED-SEGMENTS value since we could skip one more segment. This toggling of SKIPPED-SEGMENTS value would be undesirable for players and hence I think the unwritten rule should be that the delta update should describe at least CEIL(Skip-boundary/targetduration) complete segments and ignore the time impact of any partially delivered segments. Is this in fact the correct interpretation?

#EXTM3U
# Following the example above, this Playlist is a response to: GET https://example.com/2M/waitForMSN.php?_HLS_msn=273&_HLS_part=3 &_HLS_skip=YES
#EXT-X-TARGETDURATION:4
#EXT-X-VERSION:9
#EXT-X-SERVER-CONTROL:CAN-BLOCK-RELOAD=YES,PART-HOLD-BACK=1.0,CAN-SKIP-UNTIL=12.0
#EXT-X-PART-INF:PART-TARGET=0.33334
#EXT-X-MEDIA-SEQUENCE:266
#EXT-X-SKIP:SKIPPED-SEGMENTS=3
#EXTINF:4.00008,
fileSequence269.mp4
#EXTINF:4.00008,
fileSequence270.mp4
#EXT-X-PART:DURATION=0.33334,URI="filePart271.0.mp4"
#EXT-X-PART:DURATION=0.33334,URI="filePart271.1.mp4"
#EXT-X-PART:DURATION=0.33334,URI="filePart271.2.mp4"
#EXT-X-PART:DURATION=0.33334,URI="filePart271.3.mp4"
#EXT-X-PART:DURATION=0.33334,URI="filePart271.4.mp4",INDEPENDENT=YES
#EXT-X-PART:DURATION=0.33334,URI="filePart271.5.mp4"
#EXT-X-PART:DURATION=0.33334,URI="filePart271.6.mp4"
#EXT-X-PART:DURATION=0.33334,URI="filePart271.7.mp4"
#EXT-X-PART:DURATION=0.33334,URI="filePart271.8.mp4",INDEPENDENT=YES
#EXT-X-PART:DURATION=0.33334,URI="filePart271.9.mp4"
#EXT-X-PART:DURATION=0.33334,URI="filePart271.10.mp4"
#EXT-X-PART:DURATION=0.33334,URI="filePart271.11.mp4"
#EXTINF:4.00008,
fileSequence271.mp4
#EXT-X-PROGRAM-DATE-TIME:2019-02-14T02:14:00.106Z
#EXT-X-PART:DURATION=0.33334,URI="filePart272.a.mp4"
#EXT-X-PART:DURATION=0.33334,URI="filePart272.b.mp4"
#EXT-X-PART:DURATION=0.33334,URI="filePart272.c.mp4"
#EXT-X-PART:DURATION=0.33334,URI="filePart272.d.mp4"
#EXT-X-PART:DURATION=0.33334,URI="filePart272.e.mp4"
#EXT-X-PART:DURATION=0.33334,URI="filePart272.f.mp4",INDEPENDENT=YES
#EXT-X-PART:DURATION=0.33334,URI="filePart272.g.mp4"
#EXT-X-PART:DURATION=0.33334,URI="filePart272.h.mp4"
#EXT-X-PART:DURATION=0.33334,URI="filePart272.i.mp4"
#EXT-X-PART:DURATION=0.33334,URI="filePart272.j.mp4"
#EXT-X-PART:DURATION=0.33334,URI="filePart272.k.mp4"
#EXT-X-PART:DURATION=0.33334,URI="filePart272.l.mp4"
#EXTINF:4.00008,
fileSequence272.mp4
#EXT-X-PART:DURATION=0.33334,URI="filePart273.0.mp4",INDEPENDENT=YES
#EXT-X-PART:DURATION=0.33334,URI="filePart273.1.mp4"
#EXT-X-PART:DURATION=0.33334,URI="filePart273.2.mp4"
#EXT-X-PART:DURATION=0.33334,URI="filePart273.3.mp4"
#EXT-X-PRELOAD-HINT:TYPE=PART,URI="filePart273.4.mp4"

#EXT-X-RENDITION-REPORT:URI="../1M/waitForMSN.php",LAST-MSN=273,LAST-PART=3
#EXT-X-RENDITION-REPORT:URI="../4M/waitForMSN.php",LAST-MSN=273,LAST-PART=3

Cheers
Will

---

From: Rob Walch <[email-masked]>
Date: Thu, 24 Mar 2022 17:52:53 -0700

Hi Will,

On Fri, Mar 18, 2022 at 2:38 PM Law, Will <wilaw=[email-masked]> wrote:
> 1. The spec says that can-skip-until attribute defines a skip boundary that “..  MUST be at least six times the Target Duration”. In the developer docs <https://developer.apple.com/documentation/http_live_streaming/enabling_low-latency_http_live_streaming_hls> we are given a sample playlist as shown below. The target duration is 4s but the skip boundary is only 12s. Should it 24s?

If the example is to follow the spec strictly, then yes it should.

> 2. If the answer to [1] is yes, then would the delta playlist as shown have add additional segments such that it described at least the last 24s of segments? Currently it only describes 4 complete…

CAN-SKIP-UNTIL should be 24 or at least six times the TARGETDURATION of 4. One of the reasons for this is so that there are no partial segments beyond the skip boundary:

   EXT-X-PART tags SHOULD be removed from the Playlist after they are
   greater than three Target Durations from the end of the Playlist.

> 3. What is the rule about how many segments must be described to meet the skip boundary declaration? Is it complete segments or does it take into consideration the partial build of the last segment…

The expectation is that the skip boundary would be large enough to include all partial segments in the delta playlist update.

   A server produces a Playlist Delta Update (Section 6.2.5.1 <https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis#section-6.2.5.1>), by
   replacing tags earlier than the Skip Boundary with an EXT-X-SKIP tag.

   When replacing Media Segments, the EXT-X-SKIP tag replaces the
   segment URI lines and all Media Segment Tags tags that are applied to
   those segments. 

To avoid a change of SKIPPED-SEGMENTS on part update, we can clarify in this section that the skip tag replaces tags further from the last full segment than the skip boundary (changes in red):

   The Playlist Delta Update is a version of the Playlist in which Media
   Segments that are further from the end of the last (Parent) Media Segment in the the Playlist than the Skip
   Boundary (Section 4.4.3.8 <https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis#section-4.4.3.8>), as well as their associated tags, are
   replaced by an EXT-X-SKIP tag (Section 4.4.5.2 <https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis#section-4.4.5.2>).

Regards,

Rob Walch
Apple Inc.