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.
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
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.
fd4e3af740 originally started installing
it, and we've been doing it ever since then. The value of having all of
these encoding profiles predefined by default is pretty dubious since a
lot of them are pretty old ('MP4 for Nokia N900' being a shining
example) and mpv is not really a good encoding tool anyways. Let's treat
it like the other conf files in etc and install it in the data directory
for reference. If someone really uses these, they can copy the file over
locally to their mpv config directory and it'll still work fine.
case_sensitive originally only affected Tab completion. It defaulted to
yes outside of Windows just to emulate the bad defaults of bash and zsh
(not fish, which has better defaults and defaults to case-insensitive
completion). This was already silly, but then it affected the fuzzy
autocompletion and case-sensitive fuzzy completion is even more silly.
And since 0b3cc3a167, it accidentally stopped affecting even that,
because the completion via script message never checked for the option.
Nobody even noticed this, meaning that nobody was relying on fuzzy
autocompletion being case-sensitive.
Just make case_sensitive only affect the new exact search, and make it
default to no on all platforms. Though IMO the search could just always
be case-insensitive.
Allow matching items exactly instead of fuzzily when prefixing the
search with ' (like in fzf) or with
--script-opt=console-exact_match=yes.
This is mainly useful to filter history entries chronologically.
You can also specify multiple search terms delimited by spaces. But '
makes every term an exact match, unlike fzf where you need to place it
before every word, since we can't hook into fzy's algorithm.
Closes#14587.
Disables perf graphs from stats.lua. They are relatively expensive to
render, causes a lot of memory to be used for caches which are never
reused because graph is rarely the same. And most importantly those
graphs are not that useful beyond quick visual inspection of jitter.
Can be enable in script-opt if needed. Cache graph is left enabled,
because it shows if cache readhead grows or not nicely.
This is a change in default for libass with harfbuzz enabled, previously
it would choose the best available shaper.
Harfbuzz isn't really needed for mpv's OSD and it comes with a
significant performance penalty, so use simple instead