Re: [Moq] Warp

Luke Curley <kixelated@gmail.com> Sat, 12 February 2022 05:20 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 835413A1349 for <moq@ietfa.amsl.com>; Fri, 11 Feb 2022 21:20:43 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.997
X-Spam-Level:
X-Spam-Status: No, score=-1.997 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, HTTPS_HTTP_MISMATCH=0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] 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 ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id OCurgoDmPoVs for <moq@ietfa.amsl.com>; Fri, 11 Feb 2022 21:20:38 -0800 (PST)
Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) (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 F30D23A1343 for <moq@ietf.org>; Fri, 11 Feb 2022 21:20:37 -0800 (PST)
Received: by mail-wm1-x32c.google.com with SMTP id bg19-20020a05600c3c9300b0034565e837b6so3626924wmb.1 for <moq@ietf.org>; Fri, 11 Feb 2022 21:20:37 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=AmpaeQbn1NI/7AO32gpY1PW3tJ5g4c6xR+t+DOasIug=; b=EGH4V2sZ4vRdb5lvxZvRDaXFbnkcQpVCyVF40xFsh1cyIN8hMbiHAsBOGEA6N66YVa wYzNS8MLVmv2h+i/U/AOW2yYPxDLe12T7Gozf/NVVNOxA/qX1KN2NbNaIXJe49pvjHOy 5hJZ6rS0u6FC9QI7hEzqHepwIdrF5e74uqUTbRsKjeBV1cUPUjd4GU1gbvA777G5y+Or JKld9ACQAIE8uQLPP51oXQnISY94gaNI34jQbAwEi8cSODDP4ql6UOB3Xc2ICEeNdOzk nsO88N90CWtECM2BEWkdT1jdTcqY2st6PFrLf0YXl89FoS6Gg8XUENOpjJafOEF5ek2B QpZQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=AmpaeQbn1NI/7AO32gpY1PW3tJ5g4c6xR+t+DOasIug=; b=QAcddrAZWurLvpXJLww3ymeTX/V7Ia0hnD9MzXkxghMxY8MnmjRxj9RTtCX0k0b0Xo jtAnDI4bl92b3sTVrWOt3rflxUF/G6GjFhe3z4LAxc6wSqdBvzopH8UVp32tLlfRGQ1k yHoIOj4jAndqdIiEQIh8UnZCndoqfExO9N1Ma721STJknB4+yiPJ8fQx+3nzZghDC1OS 7qwGIXFAS/zV0RN33pHL08OdDfXwrl72RkBLEx254bBoQ8R48xE52a1rkKjpbQdHOQgT 3pJz3Pm4ajeNg2RvGplESMCxmnHT39LjnmXnHJubhAF1Z7uNjg9YDmdp1fOZBSD137VK iPWg==
X-Gm-Message-State: AOAM530aa9BJrMU5QMdLgtozwrYcQ3YJy4135l+sK3JyZBaUDgFrwfJw Zu7rI35ONmPt/YPHAAcIPTK6rY7em5mt3pW1DI2lednS
X-Google-Smtp-Source: ABdhPJxFWxNAbUGe6CdtHNVaWDs4qrMG/beS88QivmXYZX7OeuMxu8HeMXGCafNXNSNaZe8XnCqdrq33IzDf0RgUrLU=
X-Received: by 2002:a05:600c:3515:: with SMTP id h21mr2823357wmq.166.1644643235234; Fri, 11 Feb 2022 21:20:35 -0800 (PST)
MIME-Version: 1.0
References: <CAHVo=Zm5dt7jCVDMreU0Ob5=SSm6JxrV5RMGnnWXN7NrWHCcFQ@mail.gmail.com> <CA+ag07a0wA9MW_0=mNFTakuUfVS15FizYpwhGppHO=wM5yVn=w@mail.gmail.com> <CAHVo=Zm1xu8HJFgwNT_wckWz8oVZ_3nOEBZRzag1yQ8xRkC8rw@mail.gmail.com> <B308D520-1802-40CD-9DC0-F2BC8F2F0E46@akamai.com> <CAHVo=Z=mBpoOW+aoLo6Gekps+cX9NWuQtKEqxRm=1nOmiKqeXQ@mail.gmail.com>
In-Reply-To: <CAHVo=Z=mBpoOW+aoLo6Gekps+cX9NWuQtKEqxRm=1nOmiKqeXQ@mail.gmail.com>
From: Luke Curley <kixelated@gmail.com>
Date: Fri, 11 Feb 2022 21:20:24 -0800
Message-ID: <CAHVo=Zm4eTa_iZYR9PN+8HwMJaCE2qzhMhe9H2TZzD=7aTS93g@mail.gmail.com>
To: "Law, Will" <wilaw@akamai.com>
Cc: MOQ Mailing List <moq@ietf.org>
Content-Type: multipart/alternative; boundary="000000000000d186c305d7cb57aa"
Archived-At: <https://mailarchive.ietf.org/arch/msg/moq/38ES98ZnQEXLswAER13Tg2w7TT8>
Subject: Re: [Moq] Warp
X-BeenThere: moq@ietf.org
X-Mailman-Version: 2.1.29
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: Sat, 12 Feb 2022 05:20:44 -0000

...and to clarify what I mean by "CDN support", I mean using HTTP/3
requests instead of QUIC streams. A client could request each HLS/DASH
segment in parallel providing the Warp priority as a header
<https://datatracker.ietf.org/doc/html/draft-ietf-httpbis-priority>. You
effectively get the same segment data and prioritization but encapsulated
in a HTTP response.

However it does get quite a bit more complicated than that. The biggest
issue is that prioritization is not guaranteed, especially when multiple
connections are involved (ex. different hostnames). It's also very
difficult for the server to provide a timely bandwidth estimate for ABR. We
opted to take the simpler route and push via WebTransport instead of
pulling via HTTP/3.


On Fri, Feb 11, 2022, 5:32 PM Luke Curley <kixelated@gmail.com> wrote:

> Hey Will,
>
> Unlike HLS, the media sender is responsible for ABR. Our server pulls the
> estimated bitrate directly from the QUIC congestion controller (BBR, Cubic,
> etc) and switches renditions at segment boundaries. This is a dramatic
> improvement over client-side ABR because it's the actual rate at which
> media can be sent. It's also the primary challenge with using Warp over
> HTTP/3 with CDN support.
>
> Also I want to clarify that this draft is not complete. I wanted to focus
> on what I felt were the core concepts that would shape a WG. That may have
> been a mistake because it's come up a few times... and in fact. the client
> can create streams. These are used to send messages like
> load/play/pause/track but somehow I completely neglected to document it.
>
>
> On Fri, Feb 11, 2022 at 4:27 PM Law, Will <wilaw@akamai.com> wrote:
>
>> @Luke – how does WARP handle throughput variation across the connection
>> (the equivalent of ABR with HAS)? The draft indicates that older frames are
>> dropped in the face of congestion. This implies that resolution and encoded
>> bitrate remain constant and that it’s the rendered frame rate that drops on
>> the client to compensate for any throughput degradation. If that is
>> correct, then at what point can the client decide I’m tired of receiving
>> the 4K feed at 8fps, I’d rather get 1080p at 30fps? Conceivably it could
>> request the server to begin sending a lower resolution/bitrate stream of
>> data, however the established streams are unidirectional and no control
>> back-channel is defined. It could also tune-in to a new QUIC stream at the
>> appropriate bitrate, if there was some standard metadata to define what was
>> available and how to access it.   Do you consider discovery and service
>> description to be out of scope of this core protocol definition? If so, has
>> any thought be given to extending WARP so that it includes service
>> discovery and description and perhaps a control back-channel?
>>
>>
>>
>> Cheers
>>
>> Will
>>
>>
>>
>>
>>
>> *From: *Luke Curley <kixelated@gmail.com>
>> *Date: *Friday, February 11, 2022 at 1:11 PM
>> *To: *Sergio Garcia Murillo <sergio.garcia.murillo@gmail.com>
>> *Cc: *MOQ Mailing List <moq@ietf.org>
>> *Subject: *Re: [Moq] Warp
>>
>>
>>
>> Hey Sergio,
>>
>>
>>
>> Warp has flexible latency depending on the broadcaster and viewer(s).
>>
>>
>>
>> The broadcaster chooses their encoding settings, for example using
>> b-frames (higher latency/quality) or using a larger look-ahead buffer
>> (better compression and rate control). The viewer dynamically chooses their
>> buffer size, dictating how long to wait before skipping the end of a
>> segment.
>>
>>
>>
>> With a perfect network, Warp would transfer each video frame from the
>> encoder to decoder as they are generated. However, congestion makes that
>> impossible, which is why it's necessary to have a dynamic player buffer for
>> smooth playback. For example, a viewer with a reliable connection may have
>> a 500ms buffer, while a viewer with a cellular connection may have a 2s
>> buffer, while a viewer in a developing country may have a 5s buffer, while
>> a service that archives the stream may have a 30s buffer for maximum
>> reliability.
>>
>>
>>
>> The broadcaster and any intermediate proxies do not know or care about
>> each viewer's desired latency. They just create QUIC streams, transmit
>> packets based on stream priority, and eventually close any streams if they
>> reach some maximum upper bound. This makes it ideal for video distribution
>> especially when multiple caches and proxies are involved.
>>
>>
>>
>> On Fri, Feb 11, 2022 at 11:59 AM Sergio Garcia Murillo <
>> sergio.garcia.murillo@gmail.com> wrote:
>>
>> Hi luke,
>>
>>
>>
>> QUICK question, what is the target glass to glass latency for WARP?
>>
>>
>>
>> Best regards
>>
>> Sergio
>>
>>
>>
>>
>>
>> El vie, 11 feb 2022 20:22, Luke Curley <kixelated@gmail.com> escribió:
>>
>> Hey MOQ, I just published a draft for Warp
>> <https://urldefense.com/v3/__https:/datatracker.ietf.org/doc/draft-lcurley-warp/__;!!GjvTz_vk!CN-FzuL40h3RSvNUobOIUtEEMChMR2oAcW4N7QAzHt3yJISvAijnqM0MaK7E$>.
>> Here's a quick FAQ:
>>
>>
>>
>> *What is Warp?*
>>
>> Twitch has developed a new video distribution protocol to replace our
>> custom low-latency HLS stack. Warp uses QUIC streams to deliver media
>> segments, prioritizing streams based on content and age. This allows
>> viewers to skip old video content during congestion instead of buffering;
>> improving the user experience and reducing latency.
>>
>>
>>
>> *What about contribution?*
>>
>> Warp is very similar to Facebook's RUSH
>> <https://urldefense.com/v3/__https:/www.ietf.org/archive/id/draft-kpugin-rush-00.html__;!!GjvTz_vk!CN-FzuL40h3RSvNUobOIUtEEMChMR2oAcW4N7QAzHt3yJISvAijnqK2Y57G-$> and
>> can be used as a contribution protocol. There's a few fundamental
>> differences, like the prioritization scheme and transferring media as
>> segments. This first version of the draft focuses on these core differences
>> and omits anything else that could be a distraction.
>>
>>
>>
>> *Why not WebRTC?*
>>
>> We initially used WebRTC (both media and data channels) for
>> last mile-delivery but the user experience was significantly worse than our
>> existing stack. There were so many minor issues, primarily caused by
>> WebRTC's focus on real-time latency and the inability to control the client
>> (browser) behavior. I personally had to scrap years of work on a custom
>> SFU. 😔
>>
>>
>>
>> *Why not use datagrams?*
>>
>> Warp uses QUIC streams because it dramatically simplifies the protocol.
>> We get the full benefit of QUIC's fragmentation, congestion control, flow
>> control, recovery, cancellation, multiplexing, etc. Using datagrams gives
>> you extra flexibility but it also means you have to reimplement everything
>> on every platform.
>>
>>
>>
>> *Why not use HTTP?*
>>
>> Good question! The key to warp is the prioritization mechanism, which
>> could work with HTTP/3 and possibly HTTP/2. Twitch has the benefit of
>> running our own network so it was just simpler to make a push-based
>> protocol using QUIC and WebTransport. I've got some ideas for a more
>> complicated HTTP solution that would enable CDN support..
>>
>>
>>
>> *How is media delivered?*
>>
>> Warp sends each segment (group of pictures) over a QUIC stream. Audio and
>> newer video segments are prioritized, causing older video segments to
>> starve during congestion. Either side can cancel the stream to effectively
>> drop the tail of a segment. Media is quite linear by nature and most frames
>> need to be processed in decode order.
>>
>>
>>
>> *Why not drop individual frames?*
>>
>> We decided that it wasn't worth dropping non-reference frames, given
>> their infrequency and relatively small size for high quality media. Our
>> hardware encodes (QuickSync) have only reference frames and we've seen
>> software encodes with only 3% non-reference frames by file size. And of
>> course, dropping reference frames will cause artifacting or freezing so
>> that wasn't an option.
>>
>>
>> * How could this be improved?*
>>
>> We want to experiment with layered coding (ex. SVC) at some point in the
>> future. This would involve transferring non-reference frames/slices on a
>> different QUIC stream so they can be deprioritized. Simulcast would work
>> the same way: transfer each rendition on a different QUIC stream
>> prioritized based on the resolution.
>>
>>
>>
>> *Why use fMP4?*
>>
>> HLS and DASH support CMAF: a standard for fragmenting MP4 files. Warp
>> uses this file format so we can deliver the same segment data regardless of
>> the delivery protocol. The Warp MP4 atom uses JSON because I was too lazy
>> to do things "properly" for this first draft. The wire format doesn't
>> matter!
>>
>> --
>> Moq mailing list
>> Moq@ietf.org
>> https://www.ietf.org/mailman/listinfo/moq
>>
>> <https://urldefense.com/v3/__https:/www.ietf.org/mailman/listinfo/moq__;!!GjvTz_vk!CN-FzuL40h3RSvNUobOIUtEEMChMR2oAcW4N7QAzHt3yJISvAijnqCbRA_82$>
>>
>>