Skip to content

demux/avio_crypto: add AES decryption#17908

Open
kasper93 wants to merge 16 commits into
mpv-player:masterfrom
kasper93:hls-aes
Open

demux/avio_crypto: add AES decryption#17908
kasper93 wants to merge 16 commits into
mpv-player:masterfrom
kasper93:hls-aes

Conversation

@kasper93
Copy link
Copy Markdown
Member

No description provided.

kasper93 and others added 14 commits May 11, 2026 22:40
stream-lavf-o[cookies] only feeds the lavf stream backend. Instead of
side-loading it, use core `--cookies-file` option.
Introduces stream_http, an internal libcurl-driven backend for http://
and https:// URLs. Runs all transfers on a dedicated curl multi thread
with a producer-side ring buffer, and exposes HTTP/2 multiplexing,
QUIC/HTTP/3 (when libcurl supports it), HSTS and TCP keep-alive.

Should generally be more stable and faster than FFmpeg HTTP/1.1 impl,
additionally connections are kept-alive between files open, so if you
open playlist of network files and navigate through them, it will re-use
the same connection.

Build is gated on the new 'libcurl' meson option (auto). When disabled
or unavailable, mpv silently falls back to FFmpeg's HTTP implementation.
Hook AVFormatContext.io_open so HLS/DASH segment fetches and other
nested FFmpeg I/O go through stream_http when libcurl is available.
This lets segments inherit the connection reuse, HTTP/2 multiplexing,
mid-stream resume and conditional compression of the top-level stream.

Falls back to FFmpeg's default I/O for non-HTTP URLs and when the curl
backend is not built in.
Allow only subset of supported protocols by libcurl.
At the initial file open, the buffer may be populated with more data,
than later requested by decoder, but don't drop this data. This fixes
initial open to perform multiple reads of the area, especially for
images that are likelly fully read for probbing already.
It's significantly more stable than Lavf. Fixes seeking out of cached
ranges. Additionally correctly marks demuxer_is_network for ftp too.
This mirrors `crypto+` protocol from ffmpeg, which is used in HLS
demuxer. Unfortunatelly ffmpeg doesn't use custom io_open in thier
crypto.c, so we spin our own decryption.
@Headcrabed
Copy link
Copy Markdown
Contributor

demux/avio_crypto: add AES decryption's commit info: thier->their

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants