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

Cullen Jennings <fluffy@iii.ca> Fri, 29 March 2024 15:14 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 B7682C14F696 for <moq@ietfa.amsl.com>; Fri, 29 Mar 2024 08:14:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, 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] 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 AKb3oX80_dYt for <moq@ietfa.amsl.com>; Fri, 29 Mar 2024 08:14:15 -0700 (PDT)
Received: from smtp121.iad3b.emailsrvr.com (smtp121.iad3b.emailsrvr.com [146.20.161.121]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0A2CFC14F6A3 for <moq@ietf.org>; Fri, 29 Mar 2024 08:14:15 -0700 (PDT)
X-Auth-ID: fluffy@iii.ca
Received: by smtp8.relay.iad3b.emailsrvr.com (Authenticated sender: fluffy-AT-iii.ca) with ESMTPSA id BEEB24011C; Fri, 29 Mar 2024 11:14:13 -0400 (EDT)
Content-Type: multipart/alternative; boundary="Apple-Mail=_8EB8F615-56EE-4C19-82B6-54F80478F96C"
Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3774.500.171.1.1\))
From: Cullen Jennings <fluffy@iii.ca>
In-Reply-To: <CAHVo=ZnFOLCg7B7bAcKQ52pNA9d6Zfy9F_kC8ZiRq5kK6VMEfw@mail.gmail.com>
Date: Fri, 29 Mar 2024 09:14:03 -0600
Cc: Ted Hardie <ted.ietf@gmail.com>, "Law, Will" <wilaw=40akamai.com@dmarc.ietf.org>, MOQ Mailing List <moq@ietf.org>
Message-Id: <4BA9177A-80CC-4FB3-AE5C-DDD4E3D60717@iii.ca>
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> <CAHVo=ZnFOLCg7B7bAcKQ52pNA9d6Zfy9F_kC8ZiRq5kK6VMEfw@mail.gmail.com>
To: Luke Curley <kixelated@gmail.com>
X-Mailer: Apple Mail (2.3774.500.171.1.1)
X-Classification-ID: cbb31054-a3f7-4603-937f-78b82ac078ca-2-1
Archived-At: <https://mailarchive.ietf.org/arch/msg/moq/ksEERWru85GvNIpSX2alI3DlDBk>
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: Fri, 29 Mar 2024 15:14:19 -0000


This description below is really useful - thanks.  I will note that it identical to real time with some differences of 

MIN_BUFFER probably 0. TARGET_LATNCY is dynamically adjusted but often sits around 60 ms and MAX_BUFFER again might be dynamic but would often be more like 200 ms.  The main differences would be when the buffer was persistently under running, subscribe to a stream with a lower bit rate and when the buffer underuns, just skip frames until a enough information is received to create a valid frame. 

It would be great to add to this use case roughly have receiver side adaptive bit rate would work in cases where the link became slower than the track bitrate. 

> On Mar 25, 2024, at 1:12 PM, Luke Curley <kixelated@gmail.com> wrote:
> 
> 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.