Commit Graph

12287 Commits

Author SHA1 Message Date
llyyr
834f99e469 DOCS/man/input: adjust ao-volume documentation to state reality 2025-02-14 22:48:19 +00:00
Guido Cella
e9c895f135 DOCS/man/options: explain the difference between panscan and zoom
Also suggest checking --panscan docs from its key bindings.
2025-02-14 15:28:41 +01:00
llyyr
d766875587 DOCS/man/input: fix required protocol docs for wayland clipboard
We use the ext protocol, not the wlr specific protocol. Moreover,
"zwlr_data_control_manager_v1" is an interface within the protocol, not
the protocol name itself.
2025-02-14 15:22:58 +01:00
Guido Cella
90480f7ea1 DOCS/man/input: document the clock property
Finally document the property added in 953d225368.
2025-02-14 15:21:54 +01:00
Kamikadze
e4b64fba9c DOCS/man/options: Clarify what --tone-mapping=auto does 2025-02-08 06:16:38 +01:00
Kacper Michajłow
f14660b446 Revert "vo_gpu_next: set --target-colorspace-hint to yes by default"
HDR or any color-space pass-through should be opt-in, as we cannot
control the user's compositor or display. Allowing HDR signals to be
pushed by default may lead to surprising results for some users.
Additionally, for an optimal experience, this option should be paired
with the target-peak of the display.

Make the pass-through opt-in and let the user decide if they want or
need it. By default, mpv should render a safe and consistent sRGB
output. mpv's tone mapping is generally of higher quality than any
external solution.

This reverts commit 23843b4aa5.
2025-02-08 06:15:32 +01:00
Dudemanguy
18257375e4 m_option: deprecate setting -1 to --video-aspect-override
It's unfortunate that it is implemented this way since changing it will
take time. This option should *really* be like OPT_CHOICE but with
doubles and not integers. We don't have that though and implementing it
is something for the future. Even if that was done today, this still
couldn't be switched to since setting -1 has been the effective way for
years to undo video-aspect stuff. So the approach is to just add another
special keyword for this and tell people to use that instead. Note that
setting 0 isn't deprecated since M_RANGE(0, 10) is totally fine and
would work in the future if this option type ever gets redone.
2025-02-08 02:01:13 +00:00
Dudemanguy
16828aa952 command: convert aspect, par, and sar sub-properties to double
These were still set to float. For some common aspect ratios (e.g. like
4:3), the loss of precision is significant. The underlying calculations
are already done with doubles so all that needs to be done is to change
the type of the sub-property.
2025-02-08 02:01:13 +00:00
Guido Cella
6f0a077d9b DOCS/man/options: document that --d3d11-flip=no enables transparency 2025-02-05 04:56:01 +01:00
Guido Cella
b0364f8761 osc.lua: bind right clicking the title to show history
And move show-text ${path} to middle click. This is more useful than the
replaced show-text ${filename} binding since the left click stats
binding already shows the filename, and it matches how right clicking
other buttons shows menus. Alternatively middle click could also be
bound to select-watch-later.
2025-02-05 04:55:37 +01:00
Dudemanguy
38ad1ed03b command: normalize paths for path and track-list/N/external-filename
It's better for API users to actually get predictable results.
2025-02-01 16:12:03 +00:00
Guido Cella
6fb3ac1bc7 Revert "DOCS/man/input: document that shutdown is sent when scripts terminate"
This reverts commit 86383aef95.

shutdown isn't actually sent on exit() but only with internal options,
e.g. set osc no, which isn't relevant for users.
2025-02-01 16:11:18 +00:00
Guido Cella
86383aef95 DOCS/man/input: document that shutdown is sent when scripts terminate
shutdown is not sent only when the player quits, but also when
individual script are unloaded, either by calling exit() or by toggling
options like --osc.

This was already mentioned in javascript.rst so remove it from there.
2025-01-31 06:04:54 +01:00
Guido Cella
cada717416 Revert "console.lua: add pause_on_open script-opt"
This reverts commit 850e03d29f.

The previous commit solved this in a more general way. You can do:

[open-console]
profile-cond=p['user-data/mpv/console/open'] and p['current-tracks/video/albumart'] == false
profile-restore=copy
pause

Thankfully pause_on_open was just added and has not been in a release so
we can remove it.
2025-01-31 06:04:54 +01:00
Guido Cella
8669205d92 console.lua: add user-data/mpv/console/open
Fixes #15762.
2025-01-31 06:04:54 +01:00
Guido Cella
17e4cc5397 DOCS/man/input: reorder user-data's docs
user-data/mpv/ytdl was documented out of nowhere instead of together
with user-data/osc.
2025-01-31 06:04:54 +01:00
Dudemanguy
62c3aeb9cb command: expand paths for all commands with path arguments
Follow up to be15be3a83 with the same
reasoning.
2025-01-30 21:57:31 +00:00
Dudemanguy
814316fb2a command: add metadata sub-property for track-list
Requires a little bit of massaging for the key/value access to work
correctly, it's not terribly intrusive all things considered.
2025-01-30 15:24:38 +00:00
Dudemanguy
4c3eb16a47 m_option: add -clr to keyvalue list options
Seems to have been omitted by mistake and nobody ever noticed.
2025-01-29 20:45:13 +00:00
Dudemanguy
d2c409c56b m_option: reintroduce -del to string list and keyvalue list
b56e63e2a9 removed this because it was
deprecated and not clearly useful. This commit adds this operation back
to string lists and keyvalue lists, but with one important change. It
operates via the actual values and not indexes. So you can use
--foo-del=bar,bar2 to remove bar and bar2 from foo. The difference from
using -remove is that this is subject to escaping rules and has the same
caveats as -add. Note that -del wasn't added back to the object settings
list because you can already remove multiple items with -remove from it.
2025-01-29 20:45:13 +00:00
Dudemanguy
7456816217 m_option: undeprecate list option suffixes with multiple items
Done with 4a084c0df8. The reasoning was
that it was "confusing", but without using -add it is impossible to
append multiple items to a list in a single command and just overall
makes this less powerful. The code works fine. You might find yourself
in escaping hell, but that's on the user to deal with.

Also it's worth noting that -remove with object settings lists can
actually remove multiple items and unlike the other list option types.
2025-01-29 20:45:13 +00:00
Dudemanguy
8c4ca44e24 vd_lavc: separate opts to two structs and reorganize
The options in vd_lavc are all related, but they don't all require the
same thing for runtime changes. To avoid having to manually add UPDATE_*
to every single option flag, the options can be split into two separate
structs. The vd_lavc_conf becomes a catch all for all the --vd-lavc
options that require the full UPDATE_VD flag. The rest of the options
are split off into the new hwdec_conf instead. Additionally,
--vd-lavc-software-fallback is renamed to --hwdec-software-fallback and
moved to the hwdec_conf as well. The new name better reflects what it
does and it logically fits with those more. UPDATE_* flags are added on
everything now so these should all now be changeable on runtime.
2025-01-29 15:07:42 +00:00
Dudemanguy
be15be3a83 various: expand paths for all file/directory related options
There's several path-related options that do not handle common shortcuts
(like ~/). Fix this by using mp_get_user_path where appropriate which
expands the path so users get more intuitive behavior. Fixes #15598.
2025-01-29 14:49:06 +00:00
Dudemanguy
eb612b29f2 DOCS/man/options: correct outdated --ad/--vd documentation
13add62cf0 removed support for the +
syntax for these options.
2025-01-28 15:48:15 +00:00
Dudemanguy
8d665ac2df osc.lua: add visibility_modes script opt
This allows users to choose what visibility modes they want to cycle
through when calling the osc-visibilty cycle script binding.
2025-01-28 15:47:47 +00:00
Dudemanguy
fd4aa9b533 osc.lua: deprecate pointless script-messages
1a558bf5c2 effectively aliased the custom
OSC printing to actual mpv properties instead. These only exist for
backwards compatibility which hopefully will get removed one day so
instead deprecate them and warn users of what they should be using.
2025-01-28 15:47:47 +00:00
Dudemanguy
f663591acd DOCS/man/osc: document the second arg in some script commands 2025-01-28 15:47:47 +00:00
Dudemanguy
9661a3839b command: allow frame-step to go through multiple frames and/or seek
Previously, the default behavior of frame-step and frame-back-step is to
play forward 1 frame or seek back 1 frame. We keep this behavior but
introduce additional flags to control the exact behavior of the frame
stepping. The first argument simply specifies how many frames to go
through. The second argument specifies whether to play video to step
through frames or to seek to step through frames. Playing through the
video to step through frames only works going forwards (otherwise it
will always seek). In theory we could use backwards playback for this,
but that can be decided later.

As a minor note, MPSEEK_BACKSTEP is renamed to MPSEEK_FRAMESTEP since
forward seeks can use this as well. Fixes #10128.
2025-01-28 04:20:16 +00:00
Guido Cella
57962e9980 DOCS/man/select: document the menu script-binding
Also remove select/ from the last 2 script bindings.
2025-01-27 21:21:26 +01:00
Guido Cella
1f6bba19d7 osc.lua: add an icon for the miscellaneous menu
Add the generic menu to bar layouts to provide discoverability for the
select menus to users who don't realize you can right click OSC buttons.

There's no space to add it in box layout.
2025-01-27 21:06:50 +01:00
Guido Cella
3e0b3373df select.lua: add a miscellaneous menu 2025-01-27 21:06:50 +01:00
Guido Cella
3fdc5338cc DOCS/man/select: add this file
Also update console's documentation.
2025-01-27 18:53:36 +01:00
Guido Cella
e2090533cf select.lua: select from the watch history with g-h
Implement selection of the entries in the watch history.

The last entry in the selector deletes the history file.
2025-01-27 18:53:28 +01:00
Guido Cella
b75ed73f4f loadfile: optionally save the watch history
The history could be formatted as CSV, but this requires escaping the
separator in the fields and doesn't work with paths and titles with
newlines. Or as JSON, but it is inefficient to reread and rewrite the
whole history on each new file, and doing so overwrites the history with
an empty file when writing without disk space left. So this uses a
hybrid of one JSON object per line to get the best of both worlds. This
is called NDJSON or JSONL.

Co-authored-by: Kacper Michajłow <kasper93@gmail.com>
2025-01-27 18:53:28 +01:00
nanahi
27db2e1d50 DOCS/man: add documentation of wayland backend and properties 2025-01-27 18:51:31 +01:00
nanahi
481646da37 command: add current-clipboard-backend property
Useful to know which clipboard backend is active.
2025-01-27 18:51:31 +01:00
nanahi
964017c06c stream_dvb: accept float timeout
Change the --dvbin-timeout type to float so that it
can now be set to less than 1 second.
2025-01-26 22:15:30 +01:00
Attila Fidan
51dc6286b6 video/out/wayland_common: support IME usage via text-input-v3
This is useful for text input in, for example, console.lua. Each
character in the commit string gets turned into an mpv key press.
Pre-edit strings are not handled, since there's currently no good way to
handle that or make it useful to text input scripts. Like win32, which I
tested in wine, another limitation is that the composition window is
always positioned at the top left of the window, since we cannot get
useful positioning hints from mpv scripts. It allows the composition
window to be within the window and avoids obstructing the console
prompt.

This can be enabled/disabled with --input-ime=<yes|no> (default: yes).
2025-01-25 03:14:44 +00:00
Guido Cella
0c5d966f47 console.lua: always say completions instead of suggestions
Both completions and suggestions were being used inconsistently. Just
always use completions which is much more common.
2025-01-24 04:34:49 +00:00
llyyr
4c083f130d DOCS/interface-changes: change rst exts to txt
gen-interface-changes.py only looks for .txt files.
2025-01-21 17:44:16 +01:00
Guido Cella
7a59a12b76 select.lua: select files with watch later files with g-w
Implement selection of files to resume playing from watch later config
files. Requires --write-filename-in-watch-later-config.
2025-01-05 23:21:50 +01:00
Guido Cella
b530b402bf command: add current-watch-later-dir property
It will be used in the next commit.
2025-01-05 23:21:50 +01:00
Guido Cella
ff518ee6f0 DOCS/interface-changes: add slim*bar layouts to interface changes 2025-01-05 22:03:36 +01:00
nanahi
ab47e95197 player/screenshot: support more formats for screenshot-raw command
This adds a format parameter to screenshot-raw command which controls
the format of the returned image data. In addition to the bgr0 format,
this adds support for 3 other formats: bgra, rgba, rgba64.

bgra is used by overlay-add command and several window systems.
rgba and rgba64 are used by several GPU APIs and are the formats
returned by the gpu and gpu-next screenshot code, which avoid the need
for further format conversion (see convert_image function).
rgba64 also adds the ability to acquire high bit depth screenshots
for screenshot-raw command.
2025-01-05 21:28:57 +01:00
Guido Cella
8ed672ffc8 osc.lua: add slimbottombar and slimtopbar layouts
Add layouts with only the top line of bottombar to be used with images.
2025-01-05 21:24:02 +01:00
Guido Cella
850e03d29f console.lua: add pause_on_open script-opt
Add a script-opt to pause when console opens and unpause when it closes,
disabled by default.

This is particularly useful for selectors that take several seconds to
open so you don't have to guess when to pause, like the subtitle line
selector with embedded subtitles, or my script which lets you select
which lyrics to download after requesting them with curl.
2025-01-05 21:21:32 +01:00
llyyr
baecbb12fa sub: add sub-scale-signs
Allows --sub-scale to alow scale typesetting
2025-01-05 01:14:42 +01:00
Guido Cella
2e1bc3cf26 osc.lua: allow adding custom buttons 2025-01-05 00:50:35 +01:00
Guido Cella
d84e1b3582 stats.lua: inherit --osd-shadow-offset
Unlike font and border sizes, the default stats shadow offset is 0 like
--osd-shadow-offset, so it can be inherited from it by default to not
make users configure it in 2 places.

Since 0 and negative numbers are valid offsets, use infinity as the
placeholder for unconfigured values.
2025-01-04 20:07:49 +01:00
nanahi
221f54d1f9 DOCS/man/input.rst: mark flags as optional
They are not required but the current documentation only indicates
this to some commands but not for others.
2025-01-04 20:01:25 +01:00