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
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.
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
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.
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.
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.
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.
This was a typo. Although this changes the user option name, this
filter, especially this option, is so niche that I fix it without a
deprecation period.
This was a mistake. It's too situational and it's not worth complicating
the API and every mp.input client with it. It made some sense before I
implemented input.select() because you could use input.get() to input a
choice and validate it, but in general for input.get() clients it's
better to show an error with input.set_log() instead of adding new lines
to the log everytime. This is what e.g.
https://framagit.org/Midgard/mpv-subber/-/blob/master/subber.lua does.
So this is only marginally useful for REPL scripts that keep adding
lines to the log, and the only such scripts are commands.lua and my
lua-repl.lua. commands.lua never used it and I already removed it from
lua-repl.lua. Cloning all scripts in the wiki reveals that **nobody** is
using log_error(), confirming that it is safe to deprecate.
We should have done this ages ago. These commands essentially consist of
a combination of a load action and whether or not playback should be
started. The old `-play` aliases are kept for backwards compatibility.
D3D11 only for now. Documentation says that only D3D11 and D3D12 is
supported, but it looks like Vulkan is possible too. But I realized this
after implementing this version. Vulan may be added later.
Fixes: #16613
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
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
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.
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.
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.
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.
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.
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`.
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.