Commit Graph
12468 Commits
Author SHA1 Message Date
sfan5 41f6a64506 Release 0.41.0 2025-12-21 20:08:20 +01:00
NewUserHa 08dbdd8486 DOCS/man/options: clearify that gpu-next support d3d11va and everything 2025-12-19 19:19:09 +01:00
Guido Cella acd3378c9b Revert "ytdl_hook: add option to extract chapters"
This reverts commit df1e71a7cc.

The next commit will make this unused since chapters will only be taken
from yt-dlp's JSON.
2025-12-19 18:06:14 +01:00
llyyr 1a802b1810 ao_pipewire: avoid setting any media.role by default
This adds option `--audio-set-media-role` to configure whether mpv
should set media roles to supported audio APIs or not. Disabled by
default.

By default, WirePlumber restores the volume of each application to
whatever the last application with the same media role used. This is
completely insane behavior, and I couldn’t find any way for a user to
opt out of it on my end. The `state-stream.lua` script responsible for
this mess only uses media.role if the property is present, so the only
reliable workaround is simply not to set one at all.

This WirePlumber behavior is inherited from PulseAudio, which also
exhibits the same behavior to this day.

This commit also mirrors the same change made to ao_pulse in 2015:
b7325b2f64

See also: https://gitlab.freedesktop.org/pipewire/wireplumber/-/issues/489
2025-12-13 14:46:55 +01:00
nanahi 6756e86384 player/command: fix playlist-remove argument requirement
playlist-remove has a required index argument, as indicated by the
documentation. However, in 332907e1d7
MP_CMD_OPT_ARG was mistakenly added, making it optional.
The effect of not specifying the argument is defaulting the index to 0
and always removing the first element in the playlist, which is not
expected.

Fix this by making the argument required.

Fixes: 332907e1d7
2025-11-30 14:21:09 +01:00
Lynne 69e7341e8a vd_lavc: enable hwdec for DPX by default
Another Vulkan compute codec was merged in FFmpeg, for DPX.
2025-11-30 14:20:52 +01:00
Guido Cella f6c116491a DOCS/man/input: don't discourage hook usage
This paragraph was added 10 years ago in f8dc5db315. Hooks are now
commonly used both in internal (ytdl_hook, auto_profiles) and external
scripts (e.g. https://github.com/mpv-player/mpv/issues?q=mp.add_hook).
They are the only way to handle events synchronously and nobody is just
going to change the API and break all scripts at this point, so remove
the warning.
2025-11-21 14:51:07 +01:00
Kacper Michajłow 701201b13c ci/win32: bump ffmpeg to 8.0 2025-11-15 17:08:47 +01:00
Kacper Michajłow 04055e5806 video/out/gpu/video: change treat-srgb-as-power22 default to auto
We want to have symmetry on the input and output. Also outputting sRGB
encoded image to gamma 2.2 display is clipping blacks. 2.2 displays are
more common and are reference sRGB display, which is what we should
target.
2025-11-04 20:51:50 +01:00
Kacper Michajłow 9b4341643f video/out/gpu/video: add --sdr-adjust-gamma 2025-10-29 15:36:15 +01:00
Kacper Michajłow 3e628c8d64 vo_gpu_next: linearize sRGB as a pure 2.2 power function
sRGB reference display is defined a 2.2 gamma device. To preserve the
look of the sRGB as mastered on such device, linearize it as such.

Note that sRGB encoding is piecewise with linear segment, which creates
mismatch to pure power 2.2 function, but this is intended to be viewed
on such display.

See:
IEC 61966-2-1-1999
https://community.acescentral.com/t/srgb-piece-wise-eotf-vs-pure-gamma/4024
https://github.com/KhronosGroup/DataFormat/issues/19
https://gitlab.freedesktop.org/pq/color-and-hdr/-/issues/12
https://github.com/dylanraga/win11hdr-srgb-to-gamma2.2-icm
2025-10-29 15:36:15 +01:00
nanahi 1fec44cc6c clipboard: add --clipboard-xwayland option
On Wayland envitonments with Xwayland available but without
ext-data-control-v1, mpv will fall back to the X11 backend instead of
VO backend. This may result in clipboard not working properly between
mpv and native Wayland clients.

Fix this by disabling X11 backend on Wayland envitonments by default
and adding the --clipboard-xwayland option for manual override.
2025-10-27 20:01:47 +01:00
nanahi 4f03bc1779 clipboard-x11: add x11 clipboard backend
This adds the x11 clipboard backend and native clipboard support to x11.
Clipboard monitoring is supported.
2025-10-27 20:01:47 +01:00
Lynne f181907aff vd_lavc: add ProRes RAW to the list of default hwdec codecs
Unlike all other codecs, ProRes RAW is pretty much guaranteed to be slow
as hell on the CPU, always having thousands of tiles. And even on a very
slow GPU, a CPU decode won't be anywhere near to usable to make a difference.
2025-10-27 19:52:57 +01:00
LordMZTE df939d4fe8 osdep/linux-als: support ambient-light on Linux
This implements the ambient-light property on Linux using the sysfs
interface.
2025-10-15 21:59:42 +02:00
nanahi ad59ff1b4a DOCS/man/input: document command-list contents
Forgotten in 029bb593e7.
2025-10-11 18:32:01 +02:00
Kacper Michajłow b5c538a9c7 vo_gpu_next: add --hdr-reference-white 2025-10-10 06:12:35 +02:00
Kacper Michajłow 7dd035e937 vf_format: add some basic HDR10 metadata
Can be extended if needed.
2025-10-07 07:56:18 +02:00
Kacper Michajłow 96ce2d199d vf_format: add --vf=format=transfer alias 2025-10-07 07:56:18 +02:00
Kacper Michajłow 3c1abdb7bb DOCS/man/vf: add missing st428 in vf_format 2025-10-07 07:56:18 +02:00
Kacper Michajłow 33f38423b3 vo_gpu_next: add --border-background=blur and --background-blur-radius 2025-10-06 16:27:50 +02:00
nanahi d89add6eb2 screenshot: add osd and scaled flags to screenshot commands
Currently, screenshot being scaled and the presence of OSD and subtitles
cannot be independently controlled. This adds osd and scaled flags to
screenshot commands that make it possible to e.g. take screenshots with
only OSD without subtitles, or take screenshots at scaled resolution
without OSD or subtitles.

The "window" flag is now an alias of scaled+subtitles+osd, and is kept
for convenience.
2025-10-06 04:27:13 +02:00
llyyr be5e606377 sub: make --sub-fix-timing configurable
Instead of hardcoding the threshold and keep duration in a header,
expose them as options for users to configure and set old hardcoded
values as the new defaults for those options.
2025-10-05 21:35:20 +02:00
Kacper Michajłow df4bd5d1c8 DOCS/man/options: mention --target-gamut in colorspace hint mode
The description was not complete saying only about --target-prim.
2025-10-05 21:35:00 +02:00
Guido Cella 2f7543f808 DOCS/man/input: document that screenshot-raw works in scripts
Use the same wording as expand-text and similar commands.
2025-10-05 11:50:34 +02:00
Kacper Michajłow db2b4362c7 vo_gpu_next: add --target-colorspace-hint-strict option 2025-09-27 22:16:59 +02:00
Kacper Michajłow 2a85ac806f vo_gpu_next: respect --target-gamut in colorspace hint 2025-09-27 22:16:59 +02:00
Kacper Michajłow b4c2471174 options: reduce swapchain-depth to 2 by default
It's enough to not wait for the flip and start with next frame and in
the same time minimized latency which helps display-sync modes, that are
not aware about swapchain depth.
2025-09-27 22:15:13 +02:00
Kacper Michajłow 8f6a4e50a2 Revert "vo: set swapchain-depth to 1 in display sync modes"
Allows to not wait for flip. Instead of forcing depth for display-sync
modes we will reduce default value instead.

This reverts commit d7495e4ea6.
Fixes: #16823
2025-09-27 22:15:13 +02:00
Guido Cella cabee53ebd context_menu.lua: make gap a percentage of the font_size
Avoids having to update the gap for most users who just want to change
the font size.
2025-09-27 19:26:54 +02:00
Guido Cella eac9ab275d console.lua: add gap script-opt 2025-09-27 19:26:54 +02:00
Kacper Michajłow d7495e4ea6 vo: set swapchain-depth to 1 in display sync modes
All the math and interpolation assumes immediate presentation of the
frame. VO is driven by VSYNC and it is expected that current frame that
we render will be displayed on current present call, without delay.
2025-09-23 01:25:06 +02:00
Guido Cella f147b133f0 select.lua: add online documentation menu entry 2025-09-20 18:10:23 +02:00
Guido Cella 7c1a4acdb2 select.lua: add edit-config-file and edit-input-conf
Add script bindings to edit mpv.conf and input.conf, and add them to the
menu. These are useful as shortcuts, but the main motivation is that new
users often ask why they can't find mpv.conf and input.conf, so this
creates them if they don't exist.
2025-09-20 18:10:23 +02:00
ikas 0bbcc91e1b video/out/d3d11: add changing size support for composition mode 2025-09-19 02:26:08 +02:00
Guido Cella 8406834075 context_menu.lua: add this script
This implements a ASS context menu to be used on platforms other than
Windows.

The select script message will allow selecting an item with a single
click when releasing a mouse button, like in native context menus. This
is mainly useful to cycle pause with one click.
2025-09-15 04:12:57 +02:00
arch1t3cht 31bd176357 stream_bluray: add bluray-angle option
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.
2025-09-15 03:52:35 +02:00
Kacper Michajłow 7ee677c773 meson: add mpv-register and mpv-unregister helpers on Windows
They call `--register` / ``--unregister` for users who don't want to open
console and do it manually, this is one-click solution.
2025-09-15 03:47:35 +02:00
Kacper Michajłow 4f08802ff1 osdep/w32_register: add register/unregister options for Windows
On Linux, we have `mpv.desktop`, and on macOS, we have `osxbundle`, both
of which handle file associations and protocol registration in the
system environment.

On Windows, this information is stored in the registry, so this commit
adds support for it.

It registers the application, supported file types, and supported
protocols, and adds an uninstall entry so users can remove all
registrations via the control panel. Note that this does not remove the
binary itself.

The implementation is fully portable. There are no external installers,
as mpv handles everything automatically. This should improve usability
when moving binaries and so on.

- `mpv --register` registers mpv (see verbose output for a list of actions).
- `mpv --unregister` reverts all changes made during installation.
- `mpv --register-rpath <string>` allows specifying a string to be
  prepended to `PATH` before running mpv. This is useful when using
external dependencies that shouldn't be added globally to `PATH`.
2025-09-15 03:47:35 +02:00
nanahi 77dee9be2f DOCS/man/options: add usage note for --wid=0 for win32 2025-09-07 18:19:44 +02:00
nanahi 7a5ecf1c06 video/out/w32_common: support --wid=0
Similar to X11, this makes mpv attach to the desktop wallpaper window
(make the system create one if it does not yet exist) as parent,
which makes mpv display as desktop wallpaper behind desktop icons.

Lika an actual wallpaper, mpv will not receive any keyboard or mouse
input in this mode. It can still be controlled through terminal and IPC.
2025-09-07 18:19:44 +02:00
der richter 78458a55ef mac/common: add support for force-render option 2025-08-28 15:23:33 +02:00
sfan5 653e241ac3 DOCS/lua: fix mistyped function name 2025-08-22 08:38:02 +02:00
sfan5 521e162420 DOCS/input: clarify value of hwdec-current
This can never be false, or a boolean at all.
2025-08-22 08:38:02 +02:00
Dudemanguy ce7ea3d8ea path-unix: support ~~desktop path expansion
xdg-user-dirs is basically the standard for defining user desktop
directories on linux/bsd. To account for locales and languages, we
basically have to parse the config file (~/.config/user-dirs.dirs)
directly. That or call xdg-user-dir. Either way, it's a little more
complicated than the others, but still doable enough.
2025-08-17 16:58:00 +00:00
Kacper Michajłow dbda70a11c vd_lavc: add --hwdec-threads
No reason to not enable threads if lavc supports them, same as for
software decoding. Might help with pipelining of decoding and filtering.

Performance difference may vary, but in my testing everything is working
as expected and I didn't notice any regressions.

Set to 2 threads by default as conservative value that should resolve
stalling issue, while also not spawn too many cpu threads, which won't
help with hwdec anyway and only can cause too deep queue of hardware
surfaces.

Fixes: #16578
2025-08-15 20:24:19 +02:00
Kacper Michajłow 7653cc8f09 vo_gpu_next: respect ICC profile color space
When ICC profile is applied, use it also in hint to ensure correct
target colorspace configuration. ICC profile takes precedence over
anything else, to make sure libplacebo internally interpret it the same.

Fixes: #16646
2025-08-14 22:32:43 +02:00
Kacper Michajłow 3132ad62a3 vo_gpu_next: don't hint colorspace when ICC profile is used
We don't know which colorspace the profile were created from. We could
set hint to ICC target colorspace, but it would be ambiguous, because it
doesn't say which colorspace were configured in practice.

Additionally on Wayland with all the color management the client side
ICC correction is not supported, because we cannot set pass-through
mode.

Conceptually we should use VK_COLOR_SPACE_PASS_THROUGH_EXT to get
"direct" access to display response, but while this may work on macOS,
on Wayland it means "don't configure csp", instead of "configure to
pass-through", which means colorspace would have to be configured
externally, which is also not possible, see [1].

You can also see [2] for more discussion on the topic.

For now let's not hint any colospace and leave libplacebo in default
selection. Which restores previous status quo. This can be improved in
future, but for now this fixes use of ICC profiles in default mpv
config.

[1] https://gitlab.freedesktop.org/pq/color-and-hdr/-/issues/27
[2] https://github.com/haasn/libplacebo/issues/324

Fixes: #16646
2025-08-13 03:52:10 +02:00
Dudemanguy ed7b1aca0b DOCS/interface-changes: add backticks to tls-options
It's what is normally done.
2025-08-08 01:07:00 +00:00
Dudemanguy b5c629fd12 filter_sdh: convert --sub-sdh-enclosures to a string list
This lets users specify any possible pair of characters to remote text
from in the SDH filter as opposed to the old way which would
automatically map ( to ) internally.

Additionally, this fixes #16597 because the old implementation relied on
looping over a single string using strlen for matching chars. That
doesn't work because strlen loops over bytes and non-ASCII characters
can have multiple bytes leading to false positives since the bytes could
match. There's various ways to deal with this, but simply using mpv's
internal stringlist type sidesteps that problem.
2025-08-06 13:57:38 +00:00