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

Luke Curley <kixelated@gmail.com> Mon, 25 March 2024 19:13 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 E35D1C14F689 for <moq@ietfa.amsl.com>; Mon, 25 Mar 2024 12:13:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.107
X-Spam-Level:
X-Spam-Status: No, score=-7.107 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_HI=-5, 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 er8Nb4zqS-Ym for <moq@ietfa.amsl.com>; Mon, 25 Mar 2024 12:13:01 -0700 (PDT)
Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) (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 2C0E4C14F60F for <moq@ietf.org>; Mon, 25 Mar 2024 12:13:01 -0700 (PDT)
Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-a44ad785a44so535853066b.3 for <moq@ietf.org>; Mon, 25 Mar 2024 12:13:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711393979; x=1711998779; 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=PY81MUW1i8eMaIim8eOmJ6S2ZHzpXP28nB1zWbm4Otg=; b=TjYTWFmlmofkSVo/chFNeqWzch1g5nVESmOxDj89fmWSgXtMeJOabgusfA1aGf/v4e wpWrP9TRmtyDIptm+eWGvwjrgZnjZC6PpZoXduLTbo/TbL9GFdtemgTrtF2zKLRlE2gt Nb1uDFG8MO4sfDuSe+EfDRng6RJZCF3hdrTCF+yPw7Tc00DtRUMSVfPzQAiTPZ2CL9Ch ra+JnmOKvkDALjpfX7NG0z9uPWZe6dz0JN4x9MdiCvhVfQy65kTqiJ/Bh0hFbmW3/Wbu FrUmadNfuOnCq1czS1WitNNaCneg7CbvWzCNpPZl25icTF/T6SVlyTPhgZY5t1/tLmn7 4XrQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711393979; x=1711998779; 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=PY81MUW1i8eMaIim8eOmJ6S2ZHzpXP28nB1zWbm4Otg=; b=puET50FsF3KbtOOsD2o4L9Q5WucoQjcYSF+oBg32zgBrpCPgaI7uLmAeECToGGrIh/ y1ltbZJFHpYxNvYwP6tbGk1oLtv3vC3oUnmxf+rmh7n165wY9Qyz+eD2cKtepjU2RKJ+ xXmfec09mJimvEzxZeXjDe/ur03hyQKpDdHA5V9ar9KPzQ2rc8e09rY2H0G3x6A/R1Z4 a7XgAA+Ily84uSzbf6PZ1uYSiVq27TPS8metkCDFBmL8jveoccy2e2XaSQiOWKueYA1E f3uVVM0/Kzw9aq82ip4fTY3PGF9xt40mn/tAvLreaqKq82joukOojjDlUsoHLXOTeIAG mrdw==
X-Forwarded-Encrypted: i=1; AJvYcCVUVd6MydHZufteaU42tJIlgg2K2o3yZRfUFrUntAAW9V32C+Tot4X48DtrTiYEpXLxOjSd+lZfLlTYXW0=
X-Gm-Message-State: AOJu0Yza60615kjMd/nnVcRdaPvrDRVTjHyNCy3QAPEnZI7PgzAeumy9 Tm9w/d1OLKmbQgwnUSjjVbwhS5g/b6w+c45hllYnqTW2CBzFbvuw/bVdBZ26EApD+X4lPDpgh7b Ueh2fAWyaE4LmRFDhBQ9xrJsB3Gc=
X-Google-Smtp-Source: AGHT+IGeMZ21DVchk7Z6s88HmeAj5Rgla5CVDllMka7sQJDHofib/wclt9cL+s3DEiIKUc9xveeiP8ofvcZbvg+/gkA=
X-Received: by 2002:a17:906:1796:b0:a47:3b6a:a29b with SMTP id t22-20020a170906179600b00a473b6aa29bmr4781834eje.13.1711393979061; Mon, 25 Mar 2024 12:12:59 -0700 (PDT)
MIME-Version: 1.0
References: <B1E13534-1440-42B7-A820-3EFC405AD558@iii.ca> <CAHVo=ZmUsVvnJ43-_HMjk51OcRJaYJ1iiO94Hfx9askqaMcZTA@mail.gmail.com> <1B369D1B-7B1F-46FE-B2F1-48B453F8DBFA@akamai.com> <CA+9kkMBXWaJuHrrqer6cQcL0MUQ-LURO-FCTpZ=NpTASTfY97w@mail.gmail.com>
In-Reply-To: <CA+9kkMBXWaJuHrrqer6cQcL0MUQ-LURO-FCTpZ=NpTASTfY97w@mail.gmail.com>
From: Luke Curley <kixelated@gmail.com>
Date: Mon, 25 Mar 2024 12:12:46 -0700
Message-ID: <CAHVo=ZnFOLCg7B7bAcKQ52pNA9d6Zfy9F_kC8ZiRq5kK6VMEfw@mail.gmail.com>
To: Ted Hardie <ted.ietf@gmail.com>
Cc: "Law, Will" <wilaw=40akamai.com@dmarc.ietf.org>, MOQ Mailing List <moq@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000316130061480f68b"
Archived-At: <https://mailarchive.ietf.org/arch/msg/moq/DHUzBvvnvhocsm3Opec55zhJ3z8>
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 19:13:02 -0000

On Mon, Mar 25, 2024 at 4:21 AM Ted Hardie <ted.ietf@gmail.com> wrote:

> Just so I understand the use case, is the choice of 15 seconds because of
> a control presumed to be on the player (a "go back N seconds"/"go forward N
> seconds" control)?
>
> I ask this because the ease of delivering this functionality depends a lot
> on whether the catalog producer has provided a mapping.  For a catalog with
> no mapping between groups and timings, this pretty much has to be done via
> a heuristic; for one with a well-described mapping, it should be trivial to
> extract.  If that is the case, I think it might make sense to say that the
> MoQT protocol provides the ability to request group ids/object ids earlier
> than live edge, but that mapping those to timing is not a function of the
> transport.   Any publisher that wants to provide that functionality has to
> do so in the catalog or with a timing track (and in a lot of cases, it will
> know whether or not the app has that type of control).
>
> If that were the case, then the only thing MoQT needs to do is to tell you
> the group number/object number of the live edge (as seen by the relay
> you're on).  The mechanics from that point are client driven.
>

There's a world where we add`timestamp` to the MoQT layer so the relay
becomes aware of the mapping. However, I think we keep it simple and let
the application deal with timestamps via a catalog or timeline tracks. But
I do think this is worth considering as we continue to discuss stuff like
TTLs and latency budgets, since they should be in time units.



> From my perspective, the next question is then whether you expect the
> client to have a playout buffer that allows it to handle re-ordering up to
> the 15 second mark.  If that is the case, then the subscribe with a group
> number/group id target makes sense to me, because the cache can start
> delivering whatever it has (including the live edge) and fill in the buffer
> as it gets older data, knowing that it is up to the client to hold that and
> start playback when it has the data it wants to send to the decoder.
>
> If you don't expect the playout buffer to be that large, then I think you
> do need to get the group/objects in order.  That requires either the relay
> to buffer until it can do that or something like what Cullen put forward,
> since that allows the client to drive the process in a way that gets the
> data in a specific order without going all the way to using fetch for the
> parts after the live edge.
>


Yeah, the player's goal is to build up to a 15s playback buffer so it can
continue reliable playback even during severe congestion.

Note that the "buffer" is an ordered queue, not a reassembly buffer like is
used in RTP. Playback will pause until the *next frame* is available
(buffering) and only resume once the *next MIN_BUFFER seconds are available*.
The time spent paused depends on the availability of this MIN_BUFFER, which
is why it's paramount to prioritize old media. But like you suggested, I
still want media to potentially arrive out of order so the network can be
fully utilized (not true in HLS/DASH).

The 15s number we've been talking about is what I call TARGET_LATENCY. The
idea is to start TARGET_LATENCY seconds behind the live playhead as a soft
maximum size of the buffer. What's cool is that each time the player
pauses, the TARGET_LATENCY effectively increases by the time spent paused
as we fall further behind. Note again that playback will start well before
TARGET_LATENCY has been received; it's the upper bound not the lower bound.

Finally there's a MAX_BUFFER which is based on memory available. When
TARGET_LATENCY
> MAX_BUFFER then you have the VOD use-case, which Ted I think you were
alluding to in the last paragraph. The player needs to periodically
FETCH/SUBSCRIBE with end=current+max_buffer.

For Twitch, we roughly had the numbers:

MIN_BUFFER=1s
TARGET_LATENCY=5s
MAX_BUFFER=30s


But we would regularly see sessions with TARGET_LATENCY in the 15s range
due to congestion on poor networks. In fact, we would tune this number
based on the ISP to avoid unnecessary latency or buffering at the start of
a session.

Again, I want to emphasize that while the player strives to have 15s
buffered, this buffer size will shrink during poor conditions unbeknownst
to the viewer. If there's currently 2s remaining in the buffer after a
deadzone or severe bout of congestion, the absolute worst thing we could do
is prioritize media 15s in the future, as we'll pause playback if we don't
receive the media 2s in the future. The same is true for VOD.