[Hls-interest] Reducing latency when TARGETDURATION is conservative

Luke Curley <kixelated@gmail.com> Tue, 06 April 2021 20:19 UTC

Return-Path: <kixelated@gmail.com>
X-Original-To: hls-interest@ietfa.amsl.com
Delivered-To: hls-interest@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1E3083A2F1D for <hls-interest@ietfa.amsl.com>; Tue, 6 Apr 2021 13:19:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 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_NONE=-0.0001, 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 7KGwlr2uP-fr for <hls-interest@ietfa.amsl.com>; Tue, 6 Apr 2021 13:19:22 -0700 (PDT)
Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) (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 50CE43A2F1C for <hls-interest@ietf.org>; Tue, 6 Apr 2021 13:19:22 -0700 (PDT)
Received: by mail-wr1-x432.google.com with SMTP id e12so2470092wro.11 for <hls-interest@ietf.org>; Tue, 06 Apr 2021 13:19:22 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=CE2iaI9OKqkAfXzbbHp88ymvtkw/iHOm8e+GZFpJzqY=; b=og6Y9hAIsbB9o4hWdgwwCcJ0ad3mu1mu+DMhMnhD/TzxlOY6M238YVghryNzP9U+lj BUBA0ThQslIg5jHFCLrk2En6Ii5t2r254rmZ1Vn/B6Qr1YDDg+mOoSMXQhfxa2XL5QIf S19Rf1dzoKyjml+GphrzWN5eyT9fw+H3DKQ/HQr9Vnjw63J3kx8Lp7h9KH0dgoq+B/QK s64Nx06xoSOdX9/xpOs5TN0KXSRctzHzGxkxYGCj+iicdley0EosTyUpMhkHeVAm6WCC qITpN0jhdNSMDofelL4/GWziwLirApmi8vlLZAZhUnjnxLhod757iS+JP6K58oNhNLm/ vwfQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=CE2iaI9OKqkAfXzbbHp88ymvtkw/iHOm8e+GZFpJzqY=; b=Fu10JpTOOZOnF1zRycYfNrxERT469JOLWEb2IJtR1DNim9p4FoGpf1byksObWr7y9K ieg8isdQL8ZIYPsaOsak7KYbc+7tCuGLgGdbTUvyLLUsEN8Zb4WzUeCFLT+Hd5JRK/H7 725Jy4pTsH72I/JdGrI+uyEkOHM17JFiNzpg08W+qtL/z5GbMsZAtSGqUnCLC2fhTTvQ BBsWqrDZOO6yjifc5PQkUSWEsl3m3WYmJN+jK0bnw8SIxqFSSNNcbt9iK/nlQpA69qqD haTka/RBzD5VLCAAxuhF2jj4w+mNSOis8xydefzfjZTRLYde3bAC7lIFp03wG4vtU6t6 1wXA==
X-Gm-Message-State: AOAM531Icmi9PebVNFyDb/eCNOOThpUp5kJKly2y5Yjx9Sda1+nHAzZW QDJEflaTtKii4bWPGnP8oKV+DnHC6istBb+Hu7PqorYFb+cnSg==
X-Google-Smtp-Source: ABdhPJzsl/kUwYgcs4RrX7+g80i6BDvmzGxVdz6eTXeoGX2Kp0+DEIXjlo4b2ik+koSEzUZH2Y+1p97jOG6XTlxn5sA=
X-Received: by 2002:a05:6000:1241:: with SMTP id j1mr14838wrx.330.1617740359178; Tue, 06 Apr 2021 13:19:19 -0700 (PDT)
MIME-Version: 1.0
From: Luke Curley <kixelated@gmail.com>
Date: Tue, 06 Apr 2021 13:19:08 -0700
Message-ID: <CAHVo=Zk_ew_jE98+1_XZQb_yi0N5az0aHHDqcuPunRFsPXMmMw@mail.gmail.com>
To: hls-interest@ietf.org
Content-Type: multipart/alternative; boundary="000000000000729b9d05bf538709"
Archived-At: <https://mailarchive.ietf.org/arch/msg/hls-interest/rqQWi_SsIoT2cLw52Z62QDhozck>
Subject: [Hls-interest] Reducing latency when TARGETDURATION is conservative
X-BeenThere: hls-interest@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: "Discussions about HTTP Live Streaming \(HLS\)." <hls-interest.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/hls-interest>, <mailto:hls-interest-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/hls-interest/>
List-Post: <mailto:hls-interest@ietf.org>
List-Help: <mailto:hls-interest-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hls-interest>, <mailto:hls-interest-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 06 Apr 2021 20:19:26 -0000

Hey folks,

We're trying to reduce HLS latency for iOS users (AVPlayer) but we're
running into a few issues.

We don't transcode all streams, so the broadcaster is often responsible for
setting the size of GOPs. While most broadcasting software will use a fixed
GOP interval, like 2s for OBS, it's not a guarantee. We set a conservative
value of 6s for TARGETDURATION just in case.

>From our testing, 2s segments and 6s TARGETDURATION results in 18s+ latency
with AVPlayer. The player seems to choose 3 * TARGETDURATION as the initial
latency, which is quite excessive for our use-case.

The latest HLS RFC adds the HOLD-BACK attribute
<https://tools.ietf.org/html/draft-pantos-hls-rfc8216bis-08#section-4.4.3.8>,
allowing the server to choose the initial latency. Unfortunately, this
attribute "MUST be at least three times the Target Duration" so it only
confirms the AVPlayer behavior. I think this requirement could be relaxed
without any negative impact.

There's still quite a lot of work remaining on our end to support LL-HLS.
It would be great if we could reduce HLS latency while working on adding
full LL-HLS support (ex. sub-segments, HTTP/2, etc).


Thanks!