Some demuxers like DASH and HLS, query the location through the
"location" av option, this is how http.c in lavf exposes it. Respect
this interface and expose effective url.
Fixes: https://github.com/mpv-player/mpv/pull/18044
We shouldn't default to no verification in current year. User can
opt-out if needed.
Keep it disable for builds without libcurl when libavformat is older
than 63.0.100. This is done to match ffmpeg's timeline for enabling
tls_verify by default in lavf, also to ensure we the default verify
locations will be loaded on such version.
lavf's http demuxer exposes initial/final byte offsets as AVOptions.
Some demuxers, like lavf/hls.c assume it is always available, even for
custom IO. We need to use those values for correct demuxing.
Fixes: https://github.com/mpv-player/mpv/pull/17879#issuecomment-4468476976
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.
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.
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.
trying to autocreate playlist when the file is a fifo breaks
playback. the bug report is a special case of `/dev/fd/*` but
even for named fifos, opening and closing them can cause the
other end to stop writing.
Closes: https://github.com/mpv-player/mpv/issues/17682
1-index angles to be consistent with DVD angles in mpv and with the
1-indexing in other applications like libbluray's example programs.
The three existing calls to bd_get_title_info all only access the
duration, the playlist, and the number of angles, which do not depend on
the passed angle, so they can keep being called with angle 0 for
simplicity.
Documentation taken from before
35e8b6c1e6.
Fixes#5012.
If p->mpa = NULL due to an error during a seek or fill_buffer, then when
archive_entry_seek(), if newpos != s->pos, reopen_archive() ->
mp_archive_new() -> mp_archive_probe(), which asserts stream_tell(src)
== 0. This won't be the case if the previous mpa left the source stream
seeked in the middle of the file.
For example, in samples in archives where avformat_find_stream_info
takes a long time, if playback is aborted while the demuxer is doing
that, reading from the source stream will stop working due to cancels
being triggered. When archive_entry_seek() and newpos != s->pos,
reopen_archive() -> mp_archive_new_raw() -> archive_read_open1() fails
and returns with mpa == NULL due to reads not working. Then when another
seek happens, reopen_archive() -> mp_archive_new() -> mp_archive_probe()
-> assertion failed.
One solution is to have reopen_archive return STREAM_ERROR if the stream
is cancelled, since nothing useful can happen in this case. But there
are other situations where p->mpa could become NULL (fatal errors), and
it is supposed to be possible to seek back to a working area of the
archive.
Fixes: https://github.com/mpv-player/mpv/issues/15174
It uses a more sophisticated heuristic for title selection. It not only
selects the longest title but also considers quality and chapters. Refer
to the libbluray source for details.
No documentation change, "longest" option will still look for the
longest, just may work better now.
Fixes selection of title on some discs.
Since the option system now handles all the path expansion
automatically, these recent changes can be reverted for simplicity.
This reverts commit be15be3a83.
If a card supports both DVB-T/T2 or DVB-S/S2, channels.conf.{sat,ter}
was always interpreted as DVB-T2 / DVB-S2 before this change.
After this change, using channels.conf.{sat1,ter1} will enforce
interpretation as DVB-S/T.
The superior VDR channel config format is still the recommended solution
for such cards as it allows to specify the delivery system variant per
channel, but enforcing T2/S2 for cards supporting it whenever the zap
format is used does not seem reasonable.
This is useful to run mpv from URL handler. Can be used to start mpv
from you web browser or anything that would trigger url handler for
given protocol. Only safe protocols are allowed.
Current solutions to run mpv in such context are to spawn IPC proxy and
run mpv when requested, but this is in most cases not necessary.
Currently the protocol is added in mpv.desktop. Windows related
registration will follow in future changes.
This reverts part of PR #15899 (commit dd6e3a0ece).
"Why is this even useful?": It's very useful for multi-disc playlists. Compare:
`mpv bd:///DISC{1..4}`
`mpv -\{ bd:// --bluray-device=DISC1 -\} -\{ bd:// --bluray-device=DISC2 -\} -\{ bd:// --bluray-device=DISC3 -\} -\{ bd:// --bluray-device=DISC4 -\}`