1
0
mirror of https://github.com/mpv-player/mpv synced 2025-05-12 21:27:57 +00:00
Commit Graph

6263 Commits

Author SHA1 Message Date
Guido Cella
e32beaa0db input.conf: bind Shift+{HOME,END} to go to the first and last file 2025-02-20 15:54:11 +00:00
Guido Cella
036528d44d input.conf: bind HOME to seek to the beginning 2025-02-20 15:54:11 +00:00
Dudemanguy
25a0c8307d player: add an optional mute flag when framestepping
Need to shuffle some stuff around but it's pretty simple. Mute the
audio stream before the frame step and then unmute it when we're done.
It's exactly the same as the default play mode otherwise.
2025-02-20 15:50:03 +00:00
Dudemanguy
723da77def DOCS/man/mpv: explain how to select and navigate through cdda
It's not exactly obvious and worth mentioning.
2025-02-20 15:49:45 +00:00
Dudemanguy
dd6e3a0ece stream_{bluray,cdda,dvdnav}: deprecate setting device after schema
This is allowed but it's pretty weird. You'd end up typing something
like dvd:////dev/sr0 or cdda:///dev/sr0 (notice the differing amount of
/). Why is this even useful? Just use the matching --cdda-device option.
There's no need to have two ways to do the same thing here.
2025-02-20 15:49:45 +00:00
der richter
9618aa3b21 DOCS/man/options: remove outdated wid embedding docs for cocoa
the old deprecated cocoa backend that supported wid embedding was
removed with fc4db18.
2025-02-20 15:48:44 +00:00
nanahi
f9271fbffe DOCS/man/options: fix missing space in hwdec doc
Fixes: d7159e4662
2025-02-19 17:26:39 +00:00
Guido Cella
6df54fa7b1 DOCS/man/options: document that --save-position-on-quit affects loadfile 2025-02-19 18:19:23 +01:00
nanahi
13f94700d9 f_decoder_wrapper: add --video-aspect-method=ignore
This adds --video-aspect-method=ignore to replace --video-aspect-override=0.
--video-aspect-override=0 and --video-aspect-override=-1 will no longer be
handled specially. For compatibility, 0 is mapped to always use ignore
and -1 is always mapped to always use container.

"no" is now the replacement for --video-aspect-override=-1, which is
internally remapped to -2 to avoid using a deprecated value.
2025-02-18 23:05:02 +00:00
nanahi
704f995c49 Revert "m_option: deprecate setting -1 to --video-aspect-override"
This reverts commit 18257375e4.
2025-02-18 23:05:02 +00:00
nanahi
184ace21a0 DOCS/man/options: fix sub-ass-video-aspect-override documentation
Negative values have never worked for this option since it's clamped
to M_RANGE(0, 10).
2025-02-18 23:05:02 +00:00
nanahi
84ae87bedd DOCS/man/options: use american spelling for "behavior"
For consistency with rest of documentation.
2025-02-18 23:05:02 +00:00
Kacper Michajłow
5e3f8d336d input.conf: add ctrl+p and g-m keybind for menu
Many keyboards doesn't even have MENU key and ctrl+p is common keybind
for command style menus like this one.
2025-02-17 22:54:04 +01:00
Kacper Michajłow
ba31aa72ba console.lua: use the same opacity for menu as for everything else
There was a mistake of using hex (50) instead of decimal (80) it is
converted to %x later on.
2025-02-17 22:54:04 +01:00
Dudemanguy
ae1ec5e233 DOCS/man: add a separate section for optical drive location
Unless you were compiling on an obscure OS, the default drive location
was never /dev/dvd.
2025-02-17 21:15:42 +00:00
Dudemanguy
7f00152cd7 DOCS/man/options: fix a typo in the hwdec section
Read this a million times in the PR and still missed it.
2025-02-17 21:14:05 +00:00
Dudemanguy
39b53dd893 wayland_vk: use FIFO if fifo and presentation v2 protocols are available
A very long time annoyance with wayland was compositors indefinitely
blocking our vo thread if the surface gets occluded in some way. We've
worked around this by using mailbox and our own custom vsync function.
Thankfully it looks like people are finally solving this and with these
two protocols it should be possible to guarantee forward progress on
vulkan which means all the workarounds we do shouldn't be needed. So we
can just request fifo in this case as a default since all we want is
standard vsync blocking.
2025-02-17 17:15:00 +00:00
Dudemanguy
319687f387 options: replace --wayland-disable-vsync with --wayland-internal-vsync
With the upcoming fixes to FIFO in wayland, it should be preferable to
use FIFO instead of our own hacky heuristic. This means
--wayland-disable-vsync should become a tristate option with an "auto"
behavior (not implemented in this commit). The semantics have to
slightly change so introduce --wayland-internal-vsync and deprecate
--wayland-disable-vsync.
2025-02-17 17:15:00 +00:00
nanahi
7f4add8ddb options: disable --input-ime by default
Enabling IME by default can cause problems when the player is
expecting keybinds and not text input. Windows IME implementation
mitigates this by switching IME to alphanumeric mode,
but this is impossible on Wayland with the text input protocol.

Disable it by default and add a note to recommend enabling IME only on
demand, like console.lua.
2025-02-17 16:56:47 +00:00
nanahi
bebecdf048 video/out/w32_common: support --input-ime
This allows enabling/disabling IME on win32.
2025-02-17 16:56:47 +00:00
Guido Cella
49a578faf8 DOCS/man/{mpv,osc}: say menu instead of selector
It's fine to call them menus now that they actually look like ones.
2025-02-17 16:35:27 +00:00
Guido Cella
1329b50098 console.lua: give a different background color to the selected item
The default item also has the same background color but with
transparency.

Also stop bolding selections since inverted black and white backgrounds
should be visible even with color blindness. It was annoying with
proportional fonts because it misalignes similar strings.

As mpv's default text colors are white on black border or background,
--osd-selected-color's default of a bright yellow meant to be used with
a black border becomes unreadable with the inverted white background.

We could default to a dark --osd-selected-color and a a light
--osd-selected-outline-color and use --osd-selected-outline-color as the
selected back color. However in show-text commands having only the
selected item with a different white border doesn't look good.

This therefore adds indipendent selected_color and selected_back_color
script-opts. --osd-selected-color is only used for completions and for
the selected item when searching the command history with
outline-and-shadow.
2025-02-17 16:35:27 +00:00
Guido Cella
5dec4a2464 Revert "console.lua: close with right click"
This reverts commit ad0c29e5ac.

This should be unnecessary now that the menu has a visible horizontal
and vertical hitbox, and was not discoverable anyway. Right click can be
useful even while the console is open to pause or open a context menu.
Requested in
https://github.com/mpv-player/mpv/pull/15145#issuecomment-2428032616.
2025-02-17 16:35:27 +00:00
Guido Cella
24cd11d85c console.lua: always draw a background behind items
Draw a background behind selectable items even with outline-and-shadow.
This makes sense for a menu because you want it to be readable, select
something and move on. It doesn't stay open while watching like OSD
messages and subtitles, so it can cover more of the video. In fact this
was probably the only menu without a background by default. Also the
scrollbar without a background looked weird, and the background shows
the new horizontal hit box.

--osd-outline-color determines the background color with
outline-and-shadow, while --osd-back-color determines the background
color with background-box. Some transparency is added because using pure
black is not recommended because it causes eye strain; alternatively
--osd-outline-color could default to #222222.

Drawing the background ourselves also allows making the corners rounded.

Free-form text mode keeps using only background-box backgrounds if
configured as covering the whole screen while searching stats key
bindings would be bad. Searching history also doesn't add a background
to not change the layout abruptly. When searching history with
background-box, it preserves the alpha component of --osd-back-color.
2025-02-17 16:35:27 +00:00
Guido Cella
4169b1ad1e console.lua: close when clicking outside of items horizontally 2025-02-17 16:35:27 +00:00
Dudemanguy
d7159e4662 vd_lavc: make auto the same as auto-safe and introduce auto-unsafe
Users basically never need --hwdec=auto in reality and sometimes it
bites them unexpectedly (e.g. #15814). Unfortunately the name is kind of
nice sounding and if you don't read the manual closely, you might
inadvertently end up using it. So just make auto the same as auto-safe.
auto-unsafe is introduced to have the old behavior of auto instead. A
similar thing is done with the -copy variants. Try to update the
documentation of this section a little bit and discourage people from
using auto-unsafe because it's kind of dumb.
2025-02-17 16:32:37 +00:00
Dudemanguy
f8577d1c9b build: remove ta-leak-report option
We already have more than enough options. This doesn't need to exist.
Just use the environment variable if you really want to use this for
some reason.
2025-02-16 09:43:33 +00:00
nanahi
e1bb43cce0 DOCS/man/input: remove extra quotes 2025-02-16 00:48:04 +00:00
nanahi
aab3207f81 DOCS/man: document options which are object settings list options
This is already done for other types of list options.
2025-02-16 00:48:04 +00:00
softworkz
46e58b66e6 DOCS/man/input: fix typo 2025-02-16 00:47:36 +00:00
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
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