[Moq] Flow to join 15 seconds before live

Cullen Jennings <fluffy@iii.ca> Sun, 24 March 2024 22:15 UTC

Return-Path: <fluffy@iii.ca>
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 19FFFC14F616 for <moq@ietfa.amsl.com>; Sun, 24 Mar 2024 15:15:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.909
X-Spam-Level:
X-Spam-Status: No, score=-6.909 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, 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
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 p6yZniLqLEVw for <moq@ietfa.amsl.com>; Sun, 24 Mar 2024 15:15:18 -0700 (PDT)
Received: from smtp70.iad3b.emailsrvr.com (smtp70.iad3b.emailsrvr.com [146.20.161.70]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1DD54C14F5E7 for <moq@ietf.org>; Sun, 24 Mar 2024 15:15:17 -0700 (PDT)
X-Auth-ID: fluffy@iii.ca
Received: by smtp9.relay.iad3b.emailsrvr.com (Authenticated sender: fluffy-AT-iii.ca) with ESMTPSA id 249FC200C3; Sun, 24 Mar 2024 18:15:15 -0400 (EDT)
From: Cullen Jennings <fluffy@iii.ca>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.500.171.1.1\))
Date: Mon, 25 Mar 2024 09:15:14 +1100
Cc: Luke Curley <kixelated@gmail.com>
To: MOQ Mailing List <moq@ietf.org>
Message-Id: <B1E13534-1440-42B7-A820-3EFC405AD558@iii.ca>
X-Mailer: Apple Mail (2.3774.500.171.1.1)
X-Classification-ID: cd85ecd1-7a04-4a95-bef6-cecd1ddea6ee-1-1
Archived-At: <https://mailarchive.ietf.org/arch/msg/moq/XZyzQiq67VaBwiTttvXJN7AYuFc>
Subject: [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: Sun, 24 Mar 2024 22:15:19 -0000

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 ?