Re: [Hls-interest] HLS Content Steering v1.0b1 preliminary specification

Pieter-Jan Speelmans <pieter-jan.speelmans@theoplayer.com> Sat, 20 February 2021 09:10 UTC

Return-Path: <pieter-jan.speelmans@theoplayer.com>
X-Original-To: hls-interest@ietfa.amsl.com
Delivered-To: hls-interest@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 658AD3A0D85 for <hls-interest@ietfa.amsl.com>; Sat, 20 Feb 2021 01:10:46 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.888
X-Spam-Level:
X-Spam-Status: No, score=-1.888 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_REMOTE_IMAGE=0.01, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=theoplayer-com.20150623.gappssmtp.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mqT6GpwOVnPD for <hls-interest@ietfa.amsl.com>; Sat, 20 Feb 2021 01:10:44 -0800 (PST)
Received: from mail-io1-xd2a.google.com (mail-io1-xd2a.google.com [IPv6:2607:f8b0:4864:20::d2a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 344D03A0D82 for <hls-interest@ietf.org>; Sat, 20 Feb 2021 01:10:43 -0800 (PST)
Received: by mail-io1-xd2a.google.com with SMTP id f20so8191400ioo.10 for <hls-interest@ietf.org>; Sat, 20 Feb 2021 01:10:43 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=theoplayer-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=QMXc+3D7RlYEsy1cywqqfw/DpfCDwAFTYfyM+dgFgSc=; b=VAYJoQJZCSknF+WvMOUH+opUUmxYSNq9802LXGpLJ80k9Ce7Ta7TWToW5tdnTpcFDO gCvjiGh+4nuP6RBtzEsd+CiGBgo9T0mYNizS9xgtWgR4t1QYIu5TGbJUEb16i39yp5lr CGswBzQS8MyQQw1vSIXWqGAobwGwjydssniMGozOGuJ9AMh+qdjMvOaJ3MkDT9keIZqc QVowMyjb46brbRlGlDF3ZWIYaq/gLXQxZY3O3CCAgN5i3kvJb1gqNjc3xzyLtThw+Z3J g7iVdJshNuOEr4XTJZRmjZcRfcCIbuQvesg1a9/jLAT0YfHe37igcfy4ZWa6/UF3vPI8 VT9A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=QMXc+3D7RlYEsy1cywqqfw/DpfCDwAFTYfyM+dgFgSc=; b=YHqi43lt2cYgr4kNCHfY5jelYxkSs08Jx3Qgqaw8Y9NSDQKJh5O/fgnu0ayMGhdqzL lBYZJR3HWUnckbxT8xe83ocxr2WTsq4Orz+vV5tICwBCfdMKBF6drlV2lOi4ziHgPe2H tPqXIer0ismiqYhGQaibHmKR9cuwsvj/XZWtMjAqSmv7KKbj18nT6Gkvw6GC8ITUSfQY b1P43Gg8NfkEEMaWL1aPxj5hzhnWPxjWuxdeRMu2NpzEY494EhJ85p1f9+rRwoEqeeU8 wAHeQA2Dz3Xngu6cqV7KoCbsPQex9rYq2BXb3wu7f+SAmxIuqZ3F+EAfYctJ3WUr9ws0 h7aA==
X-Gm-Message-State: AOAM530zNXz8TRiM5hEJ33Tt7Wvbw/4rnGS8Bl3DlJqHGtxW0eZ7NHCh LYobhqsZedfHZIzhwqLH52sV+tlblSJOoVn4szKmYOZaiEfZ3OzrBkgGEHYRDxABIvLhax0ihRM 6fVTK2T/TtsODEXUoUw4Q7no=
X-Google-Smtp-Source: ABdhPJzzjt0ShhkEo8SkCxttDogQ0nAUw6pE0kWi0xLPHQ2EC08N0LpNUzdz4YTtv/8nibmN5FDXslfGqPFeb/C9Wck=
X-Received: by 2002:a02:81cd:: with SMTP id r13mr13932210jag.126.1613812242981; Sat, 20 Feb 2021 01:10:42 -0800 (PST)
MIME-Version: 1.0
References: <1F29DDD8-27B8-45B9-918F-6A45E906F4F4@apple.com> <CAAqSTpn7F3LsQCYf5CYLSfh-e-ig3HjVoYP6exxSqGTodYHqdw@mail.gmail.com> <4F54439A-A5AD-4687-9097-AF07FA1FB19D@apple.com>
In-Reply-To: <4F54439A-A5AD-4687-9097-AF07FA1FB19D@apple.com>
From: Pieter-Jan Speelmans <pieter-jan.speelmans@theoplayer.com>
Date: Sat, 20 Feb 2021 10:10:06 +0100
Message-ID: <CAAqSTp=Z-GHYtA_8iPvzb0Rw1rUPrS2yHGGwE27hrOt_58YHwA@mail.gmail.com>
To: Roger Pantos <rpantos@apple.com>
Cc: hls-interest@ietf.org, http-live-streaming-review <http-live-streaming-review@group.apple.com>
Content-Type: multipart/alternative; boundary="0000000000007a4a7c05bbc0f1f9"
Archived-At: <https://mailarchive.ietf.org/arch/msg/hls-interest/exDyaqZDNiimuwxOeWwlrBPV6DE>
Subject: Re: [Hls-interest] HLS Content Steering v1.0b1 preliminary specification
X-BeenThere: hls-interest@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussions about HTTP Live Streaming \(HLS\)." <hls-interest.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/hls-interest>, <mailto:hls-interest-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/hls-interest/>
List-Post: <mailto:hls-interest@ietf.org>
List-Help: <mailto:hls-interest-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hls-interest>, <mailto:hls-interest-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 20 Feb 2021 09:10:46 -0000

Hi Roger

One downside I see with this approach is the authentication tokens which
would be harder to replace for specific CDNs.
This could be resolved by making the PREFIX attribute a PATTERN containing
a regular expression instead. While very flexible, it would make things
slightly more complicated.
Also, what if CDN1 does not need an authentication token, but CDN2 does. In
that case, you might need to simply append rather than replace the token.
Another case would be if you would use relative paths, it could require a
prepend, and again only for CDN paths other than the current.

I do like the flexibility EXT-X-DEFINE gives. There could be an
intermediate solution where you use the EXT-X-STEERING with a PREPEND,
APPEND and FIND (and REPLACE) where the value could be a parameter as
defined in EXT-X-DEFINE.
In practice, it could look like this:

#EXT-X-STREAM-INF:BANDWIDTH=200000,STEERING=“1”
https://a.example.com/video/mid/index.m3u8

#EXT-X-STREAM-INF:BANDWIDTH=400000,STEERING=“1”
https://a.example.com/video/high/index.m3u8

#EXT-X-STEERING-TEMPLATE:ID=“1”,FIND="https://a.example.com/video
”,REPLACE="DOMAIN",APPEND="AUTH"

With a steering manifest amongst the lines of
{

  "TTL": 300,
  "RELOAD-URI": "https://example.com/steering?video=00001&session=123",
  "PATHWAYS": [
    {
      "ID": "My-Great-CDN",
      "VALUES": {
        "DOMAIN": "example.com",
        "AUTH": ""
      }
    },
    {
      "ID": "My-Backup-CDN",
      "VALUES": {
        "DOMAIN": "backup.example.com",
        "AUTH": "?auth=456"
      }
    }
  ]
}

It could give a "best of both worlds" where a variable could be filled in
through the original mechanism, but basically filling in a "default" value
for the variables. The case which could still remain tricky is the
authentication tokens, or if you have the authentication token in the URI
path, meaning you need to do 2 replaces (you could allow multiple
templates, but then it becomes hard again as you won't know which takes
precedence).

Best regards,
Pieter-Jan




*Pieter-Jan Speelmans*CTO

*THEO Technologies NV*
*w *| www.theoplayer.com
Philipssite 5, Bus 1. 3001 Leuven, Belgium
<https://d2oj23ymxjbl3l.cloudfront.net/>
Leuven (Belgium) - New York (US) - Singapore (SG) - Barcelona (ES)
BTW: BE 0847.829.290, RPR: Leuven


On Sat, Feb 20, 2021 at 4:07 AM Roger Pantos <rpantos@apple.com> wrote:

>
>
> On Feb 17, 2021, at 1:46 PM, Pieter-Jan Speelmans <
> pieter-jan.speelmans@theoplayer.com> wrote:
>
> Hi all
>
> I am pretty concerned about the backwards compatibility problems when
> attempting to use this in combination with older devices. It will force
> services to either provide two playlists, one with and one without
> EXT-X-DEFINE with client-side detection of the maximum version supported by
> the client. While this will not be an issue for up to date Apple devices,
> this will definitely be an issue for out of date devices but also most
> smart TVs, Chromecasts, Airplay implementations by those other than Apple
> (f.e. on LG), ...
>
>
> Well, we’re still early enough that we could consider changing the format.
> I’m not particularly moved by the hardship of supporting EXT-X-DEFINE —
> anybody who is implementing content steering is going to have to do at
> least that much work in their m3u8 parsing anyway — but I acknowledge that
> requiring content vendors to provide a different master playlists for old,
> un-updated clients is a non-trivial burden.
>
> What if we took the following approach instead?
>
> First, add a new STEERING attribute to regular EXT-X-STREAM and MEDIA tags:
>
> #EXT-X-STREAM-INF:BANDWIDTH=200000,STEERING=“1”
> https://a.example.com/video/mid/index.m3u8
>
> #EXT-X-STREAM-INF:BANDWIDTH=400000,STEERING=“1”
> https://a.example.com/video/high/index.m3u8
>
> This links the variants (and renditions) to a steering template definition:
>
> #EXT-X-STEERING-TEMPLATE:ID=“1”,PREFIX="https://a.example.com/video”
>
>
> #EXT-X-CONTENT-STEERING:SERVER-URI="/steering?video=00001",PATHWAY-ID="My-Great-CDN"
>
> The manifest would change a bit:
>
> {
>    "VERSION": 0
>    "TTL": 300,
>    "RELOAD-URI": "https://example.com/steering?video=00001&session=123",
>    "PATHWAYS": [
>        {
> "ID": "My-Great-CDN",
> "TEMPLATES": {
>   "1" : {
> “PREFIX”: "https://a.example.com/video"
>   }
> }
>        },
>        {
> "ID": "My-Backup-CDN",
> "TEMPLATES": {
>   "1" : {
> “PREFIX”: "https://b.example.com/backup-video"
>   }
> }
>        }
>    ]
> }
>
> The client would load and play the master playlist as usual. When it
> parsed the EXT-X-STREAM-INF and EXT-X-MEDIA tags it would see the STEERING
> attribute and verify that there is a corresponding EXT-X-STEERING-TEMPLATE
> and that the PREFIX of the steering template matches the start of the URI
> (fatal error if either check fails). It would store away the remainder of
> the URI as the “steerable part.”
>
> When it loaded the manifest it would check that each pathway had an object
> in its TEMPLATES object for each STEERING-TEMPLATE (matching the key to the
> ID). (If it did not, steering would be disabled.)
>
> To switch pathways it would concatenate the PREFIX from
> the TEMPLATES object with the steerable part of each URI. After that,
> everything would behave the same way.
>
> This approach isn’t as flexible as general variable substitution. But I
> think that it would still cover the majority of the substitution use cases
> (and I’d be interested to hear about those that it doesn’t).
>
>
> Roger.
>
>
> My personal opinion is that the value of backwards compatibility would
> warrant the drawbacks I currently see.
>
> Best regards,
> Pieter-Jan
>
>
>
> *Pieter-Jan Speelmans*CTO
>
> *THEO Technologies NV*
> *w *| www.theoplayer.com
> Philipssite 5, Bus 1. 3001 Leuven, Belgium
> <https://d2oj23ymxjbl3l.cloudfront.net/>
> Leuven (Belgium) - New York (US) - Singapore (SG) - Barcelona (ES)
> BTW: BE 0847.829.290, RPR: Leuven
>
>
> On Wed, Feb 17, 2021 at 9:57 PM Roger Pantos <rpantos=
> 40apple.com@dmarc.ietf.org> wrote:
>
>> Hello hls-interest,
>>
>> As discussed on the call today, here is the preliminary specification for
>> the new Content Steering feature. We are converging on the final design for
>> 1.0, so please take a look at it when you can and tell us what you think.
>>
>> You can send feedback to this list, or to
>> http-live-streaming-review@group.apple.com if you want it to go directly
>> to us.
>>
>>
>>
>>
>> regards,
>>
>> Roger Pantos
>> Apple Inc.--
>> Hls-interest mailing list
>> Hls-interest@ietf.org
>> https://www.ietf.org/mailman/listinfo/hls-interest
>>
>
> *Legal Notice *
> You can find the latest terms and policies of THEO Technologies under
> www.theoplayer.com/terms including our "GENERAL TERMS AND CONDITIONS". In
> the absence of a signed agreement between you and THEO Technologies, by
> replying to this email these terms apply to the relevant transaction
> between us.
> The contents of this email message and any attachments are intended solely
> for the addressee(s) and contain CONFIDENTIAL and/or privileged information
> and are legally protected from disclosure. If you are not the intended
> recipient of this message, please immediately alert the sender by reply
> email and then delete this message including any attachments and you are
> hereby notified that any use, dissemination, copying, or storage of this
> message or its attachments is strictly prohibited.
> Full security of emails over the internet cannot be ensured. Despite our
> efforts it is your responsibility to provide for your protection.
> Global HQ: THEO Technologies NV, Philipssite 5 bus 1, 3001 Heverlee,
> Belgium - BE 0847.829.290 - CEO: Steven Tielemans
>
>
>

-- 
*Legal Notice *
You can find the latest terms and policies of THEO 
Technologies under www.theoplayer.com/terms 
<http://www.theoplayer.com/terms> including our "GENERAL TERMS AND 
CONDITIONS". In the absence of a signed agreement between you and THEO 
Technologies, by replying to this email these terms apply to the relevant 
transaction between us.   
The contents of this email message and any 
attachments are intended solely for the addressee(s) and contain 
CONFIDENTIAL and/or privileged information and are legally protected from 
disclosure. If you are not the intended recipient of this message, please 
immediately alert the sender by reply email and then delete this message 
including any attachments and you are hereby notified that any use, 
dissemination, copying, or storage of this message or its attachments is 
strictly prohibited. 
Full security of emails over the internet cannot be 
ensured. Despite our efforts it is your responsibility to provide for your 
protection.
Global HQ: THEO Technologies NV, Philipssite 5 bus 1, 3001 
Heverlee, Belgium - BE 0847.829.290 - CEO: Steven Tielemans