Re: [Moq] Flow to join 15 seconds before live

Luke Curley <kixelated@gmail.com> Mon, 25 March 2024 05:57 UTC

Return-Path: <kixelated@gmail.com>
X-Original-To: moq@ietfa.amsl.com
Delivered-To: moq@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3CDC2C14F6BF for <moq@ietfa.amsl.com>; Sun, 24 Mar 2024 22:57:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.106
X-Spam-Level:
X-Spam-Status: No, score=-2.106 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vIVWywsg3pzd for <moq@ietfa.amsl.com>; Sun, 24 Mar 2024 22:57:53 -0700 (PDT)
Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A430AC14F6AB for <moq@ietf.org>; Sun, 24 Mar 2024 22:57:34 -0700 (PDT)
Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-a467d8efe78so465460266b.3 for <moq@ietf.org>; Sun, 24 Mar 2024 22:57:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711346251; x=1711951051; darn=ietf.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=z7y3BoUQL+INOW7jGJOaierH74Vb7UYB7Oqp50ExCLM=; b=JZ46njDQSGEX2h74UuASNGgRhL+tUJdG2arwyPC6MzAH38OhBFdvMgoM1x6WX1TgpW hzM0c9YcmJEV2V0GjpmFIx27yr54L6iGidE6GyQo8TDCIl62Ey+eLyCMUVRQV4I9Oi8B cLVozunFXRiLsxdGYdCb+5ylSzryySDgOZZRy5QSfs2cnWYcWrp++Yra260yY7z+YoUF mUCs0mzvORWT1B+8GoPUWPwknd+Z9b8Y5Td4UfLsPwtLgskiTq8kTzAvcNkLFvnfbztx 2cC3En88ED3vorksSN73hG8cTGkkaWuHCB2XjI5hhFl0ETROgwBUwBNhqLL3TuSiOxaW 0QRA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711346251; x=1711951051; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=z7y3BoUQL+INOW7jGJOaierH74Vb7UYB7Oqp50ExCLM=; b=Q6syYNeva5Ya4jO2IOYwQxmCoZ6KjERiFETG9IqQzLf00aKNNqYoeJXwc2zFTEqelA FO+HiVzecoU/TVSvA8WvEN4ITDVWbo8TaUSyoZtas+CJ+XorR4xnyZFnBmgDUMQ5fzbp x/XPuUl780U6Z/QFPPf5vrBOVFA2Tou+QCIU3faCpTj+HMzW1qSo56u6U+d0oemHpanT U35dPouXYRYx5qeU8/ztzNw1pS9l0Mf7Xjn4iUONrDA75rnZZFndVFXab0Lll6iJff+D BUTwfcDdTcbE6fRekiE5dND0MZPwM69BhtpHyl8h6YI3ZI5DD5qviS3z+I8CGBlKiuBb dktA==
X-Gm-Message-State: AOJu0Yxe2VB/rSTS7fF16mLK05iNMzWxoUQEIP8OYTpKP6xt69Dn+C24 fEZsGJ1saronNJyHRu1hhiJa0t4hxwKlrwiFeJhH7yjUKK67mbh83EZb8A4Tw01EgQOeKF/EE6r D/Jt5t4kPM+YME+AHv35k8bJ2i72S4TrXF/A=
X-Google-Smtp-Source: AGHT+IEtGyrWsYkkSU6DTVZnBn4fTk7wdqXw0OtmclWk8p5zpj7oX8pMlWupcdPDo+sDA5I5dBgpHDC0l3s4t1uRFMs=
X-Received: by 2002:a17:906:6a1d:b0:a4a:3441:2e2a with SMTP id qw29-20020a1709066a1d00b00a4a34412e2amr1290333ejc.55.1711346250916; Sun, 24 Mar 2024 22:57:30 -0700 (PDT)
MIME-Version: 1.0
References: <B1E13534-1440-42B7-A820-3EFC405AD558@iii.ca>
In-Reply-To: <B1E13534-1440-42B7-A820-3EFC405AD558@iii.ca>
From: Luke Curley <kixelated@gmail.com>
Date: Sun, 24 Mar 2024 22:57:19 -0700
Message-ID: <CAHVo=ZmUsVvnJ43-_HMjk51OcRJaYJ1iiO94Hfx9askqaMcZTA@mail.gmail.com>
To: Cullen Jennings <fluffy@iii.ca>
Cc: MOQ Mailing List <moq@ietf.org>
Content-Type: multipart/alternative; boundary="0000000000005fa9ae061475d97e"
Archived-At: <https://mailarchive.ietf.org/arch/msg/moq/iKlXti-EIqXVEhwmxsvMfYp6vms>
Subject: Re: [Moq] Flow to join 15 seconds before live
X-BeenThere: moq@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: Media over QUIC <moq.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/moq>, <mailto:moq-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/moq/>
List-Post: <mailto:moq@ietf.org>
List-Help: <mailto:moq-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/moq>, <mailto:moq-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 25 Mar 2024 05:57:54 -0000

Hey Cullen, thank you very much for writing down the proposed flow.

The problem with this approach is that while there is head-of-line blocking
on startup (via FETCH), there is no head-of-line blocking during the steady
state (via SUBSCRIBE). Any congestion will cause the player buffer to
shrink, and unfortunately it will be filled in reverse group order. This
makes sense for low latency playback as it enables skipping content, but it
will cause excessive buffering for high latency playback that does not skip
content.

The other big issue in #421
<https://github.com/moq-wg/moq-transport/pull/421> is that we still need
the ability to SUBSCRIBE at absolute group IDs, otherwise ABR won't work
because of numerous race conditions. Even a back-to-back UNSUBSCRIBE
720p + SUBSCRIBE
240p are evaluated at different times based on different cache states
(including potentially empty). I can't think of any algorithm that works
using only relative SUBSCRIBEs, *especially* if groups are not aligned
between tracks.


As I see it, the main problem with SUBSCRIBE today is the RelativeNext and
RelativePrev start/end ID. These are both hard to reason about and
implement; what if we removed them altogether? I propose that a SUBSCRIBE
could only start/end at an absolute ID or the latest group.

And then we add SUBSCRIBE order=ASC|DESC (#411
<https://github.com/moq-wg/moq-transport/issues/411>) to indicate if
head-of-line blocking is desired, supporting both VOD (old content) and
reliable live (new content). I do think we also need SUBSCRIBE priority=N
(also #411 <https://github.com/moq-wg/moq-transport/issues/411>), as
otherwise it's undefined how multiple subscriptions/fetches interact once
we can conditionally ignore send_order, but that's a bigger discussion.


*Reliable Live (Fixed Groups)*
-> SUBSCRIBE    range=live..   order=ASC priority=1
<- SUBSCRIBE_OK range=823..
-> SUBSCRIBE    range=818..823 order=ASC priority=0
<- SUBSCRIBE_OK range=818..823

*Optional*: The first subscribe is lower priority than the follow-up,
allowing it to both learn the latest group (823) and use the first RTT to
warm the cache/connection with eventually useful data. Your proposed
frozen=true is okay but conceptually it's behaving as a HEAD request, which
I think we should add anyway (TRACK_INFO?).

*Reliable Live (Dynamic Groups)*
-> SUBSCRIBE    track=timeline range=live.. order=DESC
<- SUBSCRIBE_OK track=timeline range=823..
-> SUBSCRIBE    track=video    range=818..  order=ASC
<- SUBSCRIBE_OK track=video    range=818..

*Optional*: The timeline track has aligned groups in this example but you
should parse the received OBJECTs instead. It's still going to be 1RTT and
the timeline track needs to be fetched anyway for DVR support.

On Sun, Mar 24, 2024, 3:15 PM Cullen Jennings <fluffy@iii.ca> wrote:

>
> At the IETF meeting I said I would write something up about how a MoQ
> client could join and get the video for 15 seconds behind the live edge.
>
>
> The goal here as I understand it is let the the client get say 15 seconds
> of video before the the current live edge then start playing roughly that
> far behind. The reason it would be 15 seconds behind would be e just to
> create a play out buffer and be able to do things like shift to a lower
> bitrate subscription (client side ABR style)  if the network was getting
> crappy without having a stall in the play out. This is not a use case I do
> so I might be missing something in this but I do want to make sure this use
> case works if it is important for other people.
>
>
> Here is how I am thinking about client could do this:
>
> Step 1:
>
> Discover a relay and setup the TLS/ QUIC / MoQ connection to it.
>
> Step 2:
>
> Subscribe to the catalog and get the catalog information. From this learn
> the track name but also learn that each group is 5 seconds long ( so 3
> groups for 15 seconds ). For things that use variable groups sizes,
> subscribe to the track that gives the mapping from time to group numbers
> and get the latest data from that.
>
> Step 3:
>
> Subscribe to Track with start=next, and frozen=true.
>
> This will cause the relay to get the information from the upstream if it
> does not already have it and return information about the live head. Note
> that if the relay already has a subscription for this track, it does not
> need to do anything, just retun OK with this relays view of the current
> live edge.
>
> Relay will return a Subscribe OK with the live edge object - for example,
> lets say it is group=1234 object=5,
>
> Step 4:
>
> At this point the client knows it needs to go 3 groups back from 1234 so
> it needs groups 1231 to 1234.
>
> Client sends a Fetch of Group 1231 to 1234 with the direction set to
> normal not reverse. If the relay. is missing some of this in the relays
> cache it will request it upstream. The relay will send an OK and start
> sending all the objects in those three groups. Note that if the relay got
> several clients joining at same time, and the first requested 1231-1234 and
> the second client requested 1230-1233, the relay MAY do the optimization
> book keeping to send then  1231-1234 upstream then for the second just send
> 1230-1230 upstream as it already has requested the others.
>
> The client will receive all the objects for the three groups in the order
> of the group id / object id.
>
> Step 5:
>
> When the last object in group 1234 arrives, the client sends and subscribe
> Update that changes the freeze to false in the original subscribe and
> causes objects from the subscription to start going to the client.
>
> ( and yes we need a way to know what the last object in a group is but
> that is a separate issue. We agree we will have some way of doing this even
> though we are not sure exactly what that way is yet )
>
> At this point the client will start receiving objects from group 1235 and
> future groups.
>
>
> From a processing point of view, the client does pretty much the same
> thing when it gets an object regardless of if it came from Fetch or
> Subscribe.
>
> Few questions on this:
>
> A. Before we get into if this is the optimal solution for this, am I
> understand the problem and use case correctly ?
>
> B. Does this explanation make sense and does this solution work ?
>
> C. What is uggly or unfortunate about this solution and how big a deal is
> that ?
>
>
>
>
>
>
>
>
>
>