Commit Graph
264 Commits
Author SHA1 Message Date
Kacper Michajłow ee3d72ce02 options: enable tls-verify by default
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.
2026-05-28 20:14:35 +02:00
Kacper Michajłow 724b76fe0a stream_curl: add --curl-enabled option 2026-05-16 18:20:42 +02:00
Kacper Michajłow 9a9c890e23 stream_curl: use for ftp/ftps
It's significantly more stable than Lavf. Fixes seeking out of cached
ranges. Additionally correctly marks demuxer_is_network for ftp too.
2026-05-16 18:20:42 +02:00
Kacper Michajłow c6833a9307 stream_curl: add libcurl-based stream backend
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.
2026-05-16 18:20:42 +02:00
nanahi ed2e55b941 options: make player-operation-mode readable as a property
Make it readable as a property so that scripts and conditional
autoprofiles can customize behavior depending if player is
launched as pseudo gui mode.
2026-05-09 15:01:09 +02:00
Kacper Michajłow e0eb42c303 demux: add --demuxer-hysteresis-bytes
Fixes: https://github.com/mpv-player/mpv/discussions/17888#discussioncomment-16852506
2026-05-08 17:27:13 +02:00
nanahi 87ccb6022c command: add dropped-file property
This adds dropped-file property which contains a list of dropped files
and the type of the drop. This allows clients to implement custom drag
and drop handling.
2026-05-01 13:42:57 +02:00
nanahi e12ab84571 input: add --input-builtin-drag-and-drop option
This allows disabling the built-in drag and drop handler, while still
allowing VO to announce dropped files.
2026-05-01 13:42:57 +02:00
Kacper Michajłow f5857d3b87 demux_lavf: support multiple program mappings per stream
Each stream can belong to multiple programs, we have to support that.
Previously track could belong only to single program.
2026-05-01 11:41:31 +02:00
Kacper Michajłow eedadc24ae player/command: hide dependent tracks
They are unusable on thier own, and shouldn't be selected by the user.
Those tracks are ment to be used internally.
2026-05-01 10:42:00 +02:00
Kacper Michajłow b4a7ea306e demux_{lavf,timeline}: add --flatten-editions
Lavf exposes programs/renditions as a flat track list tagged with
program_id. We respect this metadata and group tracks into their
respective programs, as tracks from different programs may be completely
unrelated to each other.

This commits adds an option to flatten the editions and ignore the
grouping.

Fixes: https://github.com/mpv-player/mpv/issues/17836#issuecomment-4345930205
2026-05-01 10:42:00 +02:00
kamperemu 8cc65c838e osc.lua: add box width option for box and slimbox layouts
osc.lua: add slimbox width option and preserve width values for box slimbox

docs: update default box and slimbox width values in OSC configuration

docs: add `boxwidth` and `slimboxwidth` script options to osc
2026-04-29 07:22:14 +02:00
Guido Cella 5f02e1b8a2 sub: add sub-lines property
Return all subtitle lines in memory with text, start and end.

I did not name this sub-all so it cannot be misinterpreted as referring
to all subtitle tracks.

Closes #12810.
2026-04-25 19:58:52 +02:00
Julian Orth 4c9262664c wayland: implement session management
If the compositor supports session management, the mpv window is always
added to a session. The user can manage multiple sessions by using
`--wayland-session=<human-readable-name>`. Human-readable names are
mapped to session ids via files under `~/.local/state/mpv/sessions`. The
file name is computed as a hash of XDG_CURRENT_DESKTOP and the
human-readable name.

If multiple mpv instances are started with the same session name, the
latter mpv instance takes over the session.

Upon session restoration, the mpv window is restored by the compositor
according to its state from the previous session. What that entails is
compositor policy.
2026-04-24 15:36:44 +00:00
Guido Cella 6b524c4f0e ytdl_hook.lua: default to all_formats=yes
93fe7a5526 fixed the only problem with all_formats=yes, so make it the
default to allow changing tracks of ytdl_hook URLs at runtime without
re-invoking yt-dlp.

Closes #16872.
2026-04-21 22:50:12 +02:00
nanahi 531fe5a43e osc.lua: make window control buttons action customizable
Use bind_mouse_buttons helper. This makes it possible to bind custom
actions, such as right click X button to quit with watch later.
2026-04-21 18:19:18 +02:00
nanahi d9e8e0bdf6 osc.lua: add option to configure skip_forward/backward buttons
This adds _down_command support to bind_mouse_buttons so it can be
used to bind button down actions like mbtn_left_down, and let forward
and backward buttons use bind_mouse_buttons. This makes mouse button
down actions customizable.
2026-04-21 18:19:18 +02:00
Hubert Głuchowski c202be1efe player/{lua,javascript}: add mp.utils.terminal_display_width function 2026-04-21 18:17:22 +02:00
Mike Will d0df98f701 command: allow metadata to be set manually 2026-04-18 05:37:38 +02:00
NRK 0d655fe665 vo_gpu: initial support for tunable parameters
does not support everything supported by gpu-next/libplacebo,
only a subset that was needed to run some user shaders.
2026-04-17 20:03:22 +02:00
Guido Cella aec426a4d8 context_menu.lua: set user-data/mpv/context-menu/open
Closes #17428.
2026-04-17 19:46:12 +02:00
Guido Cella e6a338a98a options.lua: stop searching in lua-settings
This has been deprecated for 8 years, since 9eadc068fa, with a visible
warning. Removing it has the benefit of not spamming every log file with
lua-settings searches.
2026-04-17 18:33:35 +02:00
Kacper Michajłow cc9610b850 demux_timeline: add support for programs 2026-04-17 18:30:43 +02:00
Kacper Michajłow 6c165fe46e demux_lavf: add support for programs
This adds proper support for MPEG-TS programs and HLS variants. Now
program selection is exposed as editions and tracks are grouped under
such edition. If there are external tracks added, they are available in
all editions.
2026-04-17 18:30:43 +02:00
NRK e2180e581e demux_playlist: only autocreate on regular file
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
2026-04-06 18:50:28 +02:00
nanahi 80582efca5 input/cmd: use _name for command name in mpv_command_node
Some commands have named arguments named "name", which conflict with
the "name" entry used to specify command name in mpv_command_node, so
they cannot be used with mpv_command_node.

These commands include:
set, del, change-list, add, cycle, multiply, enable-section,
disable-section, define-section, script-binding, keybind, keypress,
keydown, keyup, apply-profile.

This makes mpv_command_node accept command name as key "_name", so
"name" can be used to specify command arguments. For compatibility,
if "_name" entry does not exist, then "name" is used as fallback.
2026-04-06 18:33:20 +02:00
nanahi c2d9905598 DOCS/man/options: add note about %tX behavior change 2026-04-06 18:30:10 +02:00
Guido Cella c961c96afb lua: remove the deprecated error field from end-file
This has been deprecated for 6 years so remove the compatibility code.

This basically reverts 37f441d61b.
2026-04-01 22:10:08 +00:00
Guido Cella 70b8b22c8b command: remove the deprecated time-start property
This has been deprecated for 11 years since 70df1608d6 so remove it. All
it does is return 0.
2026-04-01 22:09:25 +00:00
Guido Cella ea40f07d2d DOCS/interface-changes: add newline at end of file 2026-04-01 16:47:26 +02:00
zenodity ae2384bce0 player/command: add default-value/choices arg fields to command-list
Add optional 'default-value' and 'choices' fields where appropriate
for command arguments in the 'command-list' property. Update
documentation to reflect the command-list schema change.

DOCS/interface-changes/command-list: add changes
2026-04-01 16:08:26 +02:00
Kacper Michajłow 39302caae4 osc.lua: use window title for window controls from mpv core 2026-04-01 16:07:27 +02:00
NRK d79c4ad1e3 player/command: add env property
mainly so that env vars can be accessed from within config files.
2026-03-31 18:44:10 +00:00
Dudemanguy 90985bb826 vo: officially deprecate vo_vaapi
Using vo_vaapi has already been heavily discouraged for years since
years since 5c313f1f59. More importantly,
it's just fundamentally broken on most hardware, serves no real purpose,
and well we shouldn't just ship broken stuff. vo_vaapi largely only ever
worked correctly on some intel hardware. The VO relies on certain API
calls that other vendors never implemented so things like the OSD and
subtitles are just never going to work. This largely has no reason to
exist either. If you're looking for efficient playback, you can use
vo_gpu/vo_gpu_next in dumb mode with vaapi decoding. You can also use
vo_dmabuf_wayland with vaapi as well to avoid even more GPU to CPU
copies and theoretically be even more efficient.
2026-03-30 00:34:31 +00:00
Kacper Michajłow 793ab6dcb0 options: target-gamut now accepts custom CIE xy primaries
Fixes: #17633
2026-03-25 02:01:03 +01:00
Kacper Michajłow 7466a9f9f3 video/out/win_state: don't move window when force-window-position=no
When force-window-position=no place window on requested position only on
init (when VO requests `force_pos`), except that keep existing
position on auto resizes.

This applies to both user provided geometry and default center
position.

Fixes: #17588
2026-03-23 15:05:01 +01:00
nanahi f7f7cf18f3 command: add update-clipboard command
This uses the update_data request for clipboard backends that require it.
When clipboard monitoring is disabled, the backends will no longer
fetch data when it detects data change, and will now only do that when
receiving the update_data request.

The client now needs to run this command to update the clipboard content,
otherwise the property value is outdated.

This makes sure that applications that depend on "paste once" behavior
work correctly.

This command runs in a separate worker thread so that it can be used
as a "blocking" way to update clipboard until the update notification
arrives without blocking the playback core. It accepts a maximum timeout
parameter. This uses the existing mp_cancel mechanism to make sure this
command can be aborted and the worker threads will not stall the player
too much when quitting mpv.

For backends that do not support update_data, this command does nothing.
2026-03-21 16:05:36 +01:00
Kacper Michajłow 8bf384fe6d osc.lua: add osc-icon_style option 2026-03-13 19:14:39 +01:00
Kacper Michajłow 7b2feb9429 osc.lua: add osd-margin option
Fixes: #17539
2026-03-10 19:45:03 +01:00
Kacper Michajłow e1e6eb8b6e osc.lua: add sub-margin option 2026-03-10 19:45:03 +01:00
Kacper Michajłow aa8966a50f osc.lua: add dynamic_margins option 2026-03-10 19:45:03 +01:00
nanahi 9bb5a0b705 osc.lua: add audioonlyscreen script option
Allows rendering mpv logo when there is no video, instead of
black screen. osc is still available at the same time for playback
control.
2026-03-08 13:07:37 +01:00
nanahi ba30c8c175 player/loadfile: add on_loaded hook
Currently, there is no hook which happens when the playback actually
starts. The on_preloaded hook is insufficient for many cases, as many
track information are unavailable at that stage. This makes it impossible
to act on certain track metadata before the media is shown to the user,
so the user will see the media before action for a brief moment before the
properties are notified and options are changed.

This adds the on_loaded hook which allows the mentioned information
available.
2026-03-08 13:07:05 +01:00
CogentRedTester 429fdcf21d mp.input: allow clients to override console.lua script-opts
This commit allows a table of script-opt overrides to be passed to
`mp.input.get()` and `mp.input.select()`, which console.lua will use
instead of the its own.

To minimise required changes, metatables are used to allow console.lua
to seamlessly fall back on the original script-opts if the client does
not provide an override.
To prevent exceptions, the incoming opts must be of the same type.
2026-03-07 12:31:50 +01:00
Kacper Michajłow f9190e57f9 vo_gpu_next: add scRGB support
Fixes: #17076
2026-03-06 16:17:58 +01:00
Kacper Michajłow eda3b89278 osc.lua: make top/bottom bar show independently on mouse proximity
Controlled by `windowcontrols_independent` opt.
2026-03-05 12:44:11 +01:00
Kacper Michajłow e54cee1b23 player/command: apply expand-properties modifier also for string lists 2026-02-27 20:18:42 +01:00
Guido Cella 3b555c349c command: let playlist-play-index current preserve file-local-options
If you set file-local-options/foo at runtime and run playlist-play-index
current or playlist-play-index $current_pos, file-local-options/foo is
reset. Add a flag to make it preserve file-local-options.

The advantage of this change is that it allows binding Ctrl+r set
file-local-options/start ${=time-pos}; playlist-play-index current yes
to reload the current file while preserving all options, independently
of --no-config, --watch-later-options or --reset-on-next-file, and
without writing watch later files to disk. It also preserves
file-local-options set on the CLI unlike loadfile.
2026-02-27 09:21:14 +01:00
CogentRedTester 9902e84e20 DOCS/interface-changes: change how mp.input completions are returned 2026-02-24 20:19:24 +01:00
nanahi 4e2f3ce4b9 command: add track-list/N/demux-duration property 2026-02-24 19:36:33 +01:00