This series adds an http3:// read URLProtocol to libavformat: HTTP/3
(RFC 9114) over QUIC (RFC 9000), so the HTTP/HLS demuxers can fetch over
QUIC instead of TCP. QUIC transport is ngtcp2, HTTP/3 framing is nghttp3
(the same stack curl uses for HTTP/3).
Motivation: HLS/DASH and progressive playback over HTTP/3 -- 0-RTT
resumption, connection migration across network changes, and HoL-blocking-
free multiplexing. Players that delegate fetching to libavformat (e.g. mpv)
gain h3 without shipping their own QUIC stack.
Highlights:
- Seekable GET via HTTP Range; 3xx redirect following.
- Host-keyed connection pool with QUIC keep-alive, so consecutive requests
(e.g. HLS segments) reuse a connection instead of re-handshaking.
- Optional Alt-Svc discovery (the "altsvc" option) vs prior-knowledge h3.
- Multi-backend TLS following FFmpeg's own selection via the ngtcp2 crypto
helpers: GnuTLS (--enable-gnutls), or the OpenSSL-family helper -- BoringSSL
or OpenSSL 3.5+ native QUIC (ossl). Only BoringSSL pulls the C++ runtime.
- Apple: verify the peer chain against the system keychain via SecTrust,
since iOS has no file trust store (patch 2/2).
Build with --enable-libngtcp2 --enable-libnghttp3 and one TLS backend.
Tested end-to-end (HTTP/3 GET -> 200 and MP4 demux over Range) against all
three backends: GnuTLS, BoringSSL and OpenSSL 3.5.
Sent as RFC; feedback welcome on: the per-backend #if structure, whether the
pool/keep-alive/Alt-Svc belong in follow-up patches, and the OpenSSL 3.5
ossl vs quictls helper choice. The protocol is read-only for now (no
write/listen).
Simon Chrzanowski (2):
avformat/http3: add HTTP/3 (QUIC) protocol over ngtcp2/nghttp3
avformat/http3: verify the peer certificate via the system keychain on
Apple
Changelog | 1 +
configure | 28 +
doc/protocols.texi | 27 +
libavformat/Makefile | 1 +
libavformat/http3.c | 1249 +++++++++++++++++++++++++++++++++++++++
libavformat/protocols.c | 1 +
6 files changed, 1307 insertions(+)
create mode 100644 libavformat/http3.c
--
2.47.3
_______________________________________________
ffmpeg-devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]