Commit Graph
12612 Commits
Author SHA1 Message Date
Kacper Michajłow 448de741f9 DOCS/compile-windows.md: update guide to mention missing pieces 2026-06-03 05:06:14 +02:00
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
NRK 59c91def55 osc: add back hover-sec in draw-preview
this was initially part of draw-preview but was later moved to a
separate property because it was deemed useful outside of just
thumbnail preview. however this causes bugs when a thumbnailer
observes draw-request and the draw rectangle doesn't change (e.g
due to getting clamped around the border).

add back hover-sec which makes the draw-request more self
contained and removes this footgun.

Fixes: https://github.com/mpv-player/mpv/pull/17518#discussion_r3256017469
2026-05-20 23:17:17 +02:00
Guido Cella 3d111fbf1e demux_libarchive: apply --directory-filter-types to files in archives
Fixes #17931.
2026-05-20 23:15:44 +02:00
Mikael Magnusson 7d603534de msg: don't allow any escapes in --term-title
Unlike --term-playing-msg, the --term-title string is printed in an
escape sequence already. If we print other escapes during this sequence,
it will abort the sequence and dump the rest of the title string as a
visible string to the user, and possibly beep as well, since the title
string can end with a bel character.

Also updates the manpage to remove a comment about win32, since
terminal-win.c does handle OSC title sequences, calling SetConsoleTitleW.
2026-05-20 10:56:08 +02:00
Mikael Magnusson c0ef68904d video/out/x11_common: add --focus-on support in X11
Note that when the video params don't change, the check in
player/video.c does not call vo_reconfig2 and the _NET_ACTIVE_WINDOW
message is not sent. As far as I can tell, the same limitation is true
for the macOS implementation, but I can't test that.
2026-05-20 10:55:59 +02:00
Lynne 4c72a03546 video/decode: enable APV hwdec by default
Today, FFmpeg got an APV decoder written in Vulkan compute shaders.
2026-05-20 10:55:48 +02:00
Clinton Phillips 35ae76daad docs/comments: fix more doubled-word typos
Follow-up to #17926, addressing the four additional instances flagged
by @garoto:

- DOCS/man/options.rst: "output size size is limited" -> "output size is limited"
- DOCS/man/input.rst: "Called after after a file" -> "Called after a file"
- video/out/gpu/video.c: "target target that needs to be written" -> "target that needs to be written"
- video/out/x11_common.c: "enable DPMS only we we disabled it before" -> "enable DPMS only if we disabled it before"
  (this one wasn't a pure duplicate — the first "we" was a typo for "if"; the comment now matches the conditional on the line above)
2026-05-18 16:47:14 +02:00
Kacper Michajłow 059bc7025b stream_curl: disable by default on libavformat < 62.15.101 2026-05-16 18:20:42 +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
Clinton Phillips 779378c248 docs/comments: fix doubled-word typos
Pure typo fixes in user-facing manpages, interface changelog, and
source comments. No behavior change.

- DOCS/man/encode.rst: "copying of the the comment" -> "copying of the comment"
- DOCS/man/options.rst: "visible takes the the menu bar" -> "takes the menu bar"
- DOCS/interface-changes.rst: "rename the the lua-settings/" -> "rename the lua-settings/"
- video/out/present_sync.c: "requires that that caller" -> "requires that the caller"
- player/lua.c: "try to get by by filtering" -> "try to get by filtering"
2026-05-16 05:26:02 +02:00
Kacper Michajłow 4498c0ff81 ci/build-win32.ps1: bump ffmpeg to 8.1 branch 2026-05-15 00:40:17 +02:00
nanahi 7b057f66fa DOCS/man/mpv: add usage hint alternative for pseudo-gui profile
This has been deprecated for 9 years since
9eef41dec1.
With the previous commit, this can be replaced by conditional autoprofiles.
Add usage hint to the documentation.
2026-05-09 15:01:09 +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 675fb1229b input/dnd: move --drag-and-drop handling to dnd client
This unifies --drag-and-drop handling to a single place. All platforms
currently only support normal drop (mapped to "replace") and shift click
drop (mapped to "append").
2026-05-01 13:42:57 +02:00
nanahi 81611b4a4e input/dnd: move built-in drag and drop handling to mpv client
This moves the drag and drop handling to an internal mpv client,
removing the hardcoded handling from core.
2026-05-01 13:42:57 +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 c0c7584342 etc/builtin.conf: change gui mode to idle=yes
It is more expected from GUI application to stay open, even after
playback. Additionally this gives user a chance to inspect possible load
failures, while previously mpv would disappear.
2026-05-01 11:42:04 +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 ae3189567b select.lua: add select-secondary-subtitle-line
Requested in https://github.com/mpv-player/mpv/pull/17730#issuecomment-4321224996
2026-04-26 08:55:42 +02:00
Guido Cella 77ed8fef88 select.lua: use sub-lines instead of forking to ffmpeg
This:

- Removes the dependency of ffmpeg in PATH - useful on Windows, macOS
  (?), Flatpak.
- Will support subrandr.
- Avoids redownloading network subtitles.
- Avoids slow demuxing of large mkvs.
- But no longer returns future lines of embedded subtitles.
- No longer returns embedded lines of regions you seeked beyond without
  playing them.
- Changing sub track drops cached subtitles.
2026-04-25 19:58:52 +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
Guido Cella e046cd0736 context_menu.lua: add background_alpha script-opt
Closes #17807.
2026-04-24 20:19:50 +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 35b851e38a DOCS/man/options: remove all_formats=yes warning
Dunno what wm4 was referring to here but all_formats=yes works just fine
and quickly for changing track at runtime. The only issue I see is that
it drops the video cache if you change audio track.
2026-04-21 22:50:12 +02: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
NRK 7d1a598bdd vo_gpu: support parameters in RPN expressions 2026-04-20 21:52:06 +02:00
NRK d17e32fcfc DOCS/man/options: add missing RPN operators
equal and mod are also supported but were missing in the docs.
2026-04-20 21:52:06 +02:00
nanahi 891273055f DOCS/man/input: fix mouse-pos/hover documentation
The comment about video backends not updating pointer position is only
true if no mouse button is being pressed. If mouse button is pressed on
mpv window and then moves out of window region without releasing the
button, some platforms (win32, Wayland, X11) "capture" the pointer and
still report the coordinates, while some other platforms (SDL) do not.

The value of mouse-pos/hover also differs between platforms in this case.
The value is true on win32 and Wayland, but false on X11.

Fix documentation to address them.
2026-04-18 21:13:46 +02:00
Mike Will d0df98f701 command: allow metadata to be set manually 2026-04-18 05:37:38 +02:00
NRK 09d075f475 osc: define and add support for "preview" api
this adds a "standard" api for ui scripts and thumbnailers to
communicate with each other, based on the simple thumbfast api
[0].

the api works as follows:

* To issue a thumbnail draw command, the UI script will set the
  property `user-data/osc/draw-preview`.
* To clear the thumbnail, the UI script will set the previously
  mentioned property to `nil`.

a more ideal api would make it so that the thumbnailer script
only generates the thumbnail and doesn't need to draw at all.
but such api is vastly more complex [4] and would require a lot
more work and maintenance on mpv's side.

this is a decent enough api that allows arbitrary thumbnailers
and ui scripts to communicate between each other and work
together, while being simple enough that it can be supported
without too much maintenance.

this change has been tested with work with thumbfast [1]. and
for demonstration that this api can be useful outside of osc, it
has also been tested to work on mfpbar's thumbnailer branch [2].

the code to determine thumbnail x,y is based on the osc fork
inside of thumbfast [3].

[0]: https://github.com/po5/thumbfast?tab=readme-ov-file#for-ui-developers-how-to-add-thumbfast-support-to-your-script
[1]: https://github.com/po5/thumbfast/pull/173
[2]: https://codeberg.org/NRK/mpv-toolbox/src/branch/thumbnailer/mfpbar
[3]: https://github.com/po5/thumbfast/tree/vanilla-osc
[4]: https://github.com/mpv-player/mpv/discussions/17654
2026-04-17 20:36:48 +02:00
NRK 3e0729eb06 vo_gpu: add support for ENUM parameters 2026-04-17 20:03:22 +02:00
NRK a0b6233318 vo_gpu: add support for DEFINE parameters 2026-04-17 20:03:22 +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
emberfade 179d832738 DOCS/man/vf: fix parameter separator in EBNF 2026-04-17 19:45:48 +02:00
nanahi 57490dd3a6 vo_gpu_next: add image-subs-hdr-peak=video-dynamic/video-static
Subtitles in general have constant brightness, but currently
--image-subs-hdr-peak=video uses detected peak value which is not synced
with scene and undesirable.

Add new modes that allow using static peak metadata or per-scene metadata.
2026-04-17 19:44:15 +02:00
nanahi 7f81e1ec8c vo_gpu_next: fix image subtitle hdr peak
704afb8968 assumed that HDR image
subtitles target SDR white. However, this is incorrect according to
UHD BD spec version 3.2:

> CLUTs of Presentation Graphics streams and Interactive Graphics streams
> are prepared by content author according to dynamic range property of
> the Primary video stream.
> If a Primary video stream is HDR, the Graphics streams have CLUTs
> expressed in BT.2020 color space primaries and ST2084 EOTF.
> If a Primary video stream is SDR, the Graphics streams have CLUTs
> expressed in BT.709 color space primaries and BT.1886 EOTF.

This means that PGS subtitles always have the same colorspace and HDR
dynamic range as the video, so the target peak should also be the same.

This is also supported by the BD-J spec (which displays PGS graphics):

> However the BD-ROM player does not support color space conversion nor
> dynamic range conversion of Java graphics and Background plane when
> mixing with video plane.

The Graphics model spec further states:

> The composited image on the graphics plane is transformed to full color
> and transparency by the CLUT module and then overlaid on the video
> image.

These sentences indicate that BD-ROM players simply overlay the decoded
graphics onto the video without any kind of conversion.

Change the default of image-subs-hdr-peak to 1000 to fix this.
This accommodates most HDR videos with a peak brightness of 1000 nits
and some bad HDR videos with 10000 nits peak brightness due to reencoding
and mixed with unmodified subtitles.
If there are compatibility issues, the option can be manually
set to sdr or video.

Fixes: 704afb8968
2026-04-17 19:44:15 +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 7ba2e1d713 osc.lua: reduce floatingalpha a little
Alpha blending is done in gamma light of the target, when the overlay is
drawn. Depending on VO and target format, the alpha value can act quite
differently.

Lower it a little to avoid excessive transparency in some cases. This
should be fixed or workaround in better way, but for now just adjust the
value.
2026-04-17 18:32:29 +02:00