Commit Graph
184 Commits
Author SHA1 Message Date
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
Jens Peters 4d12a60be2 docs: document tablet input 2025-07-14 22:07:24 +00:00
Dudemanguy 08d7d049d1 build: install encoding-profiles.conf into the system data directory
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.
2025-07-12 14:01:54 +00:00
Kacper Michajłow c5c1477eb4 vo_gpu_next: change --target-colorspace-hint to auto by default
Auto mode will also enable hint for SDR formats if target metadata is
reported by current output context.
2025-07-11 21:53:58 +02:00
Kacper Michajłow ce076de31f vo_gpu_next: add --target-colorspace-hint-mode option
Useful to actually set target display paramters to colorspace hint.
2025-07-11 21:53:58 +02:00
Kacper Michajłow 5b1df3c5d9 command: add video-params/prim-* properies
Available if raw primaries differ than named primaries value.
2025-07-11 21:53:58 +02:00
ourfor 7df09125f3 video/out/d3d11: add d3d11 composition mode support 2025-07-07 00:09:08 +02:00
dyphire f7707e4dd9 vo_gpu_next: add options to control subtitles peak for HDR output
Users may want to have darker subtitle brightness for HDR viewing

Closed https://github.com/mpv-player/mpv/issues/13680
2025-07-06 16:00:51 +02:00
dyphire cbea6013e4 player/command: add a default flag to the track add commands 2025-07-06 12:52:22 +02:00
nanahi 11d3ad635f DOCS/interface-changes: add --prefetch-playlist default change 2025-07-05 21:29:37 +02:00
nanahi 63defa7708 video/out/gpu/video: add options to control background tile appearance
Add options to control background tile colors and size and vo_gpu
implementation.
This allows a dark mode tile pattern.
2025-07-05 01:17:25 +02:00
Patrick Wang 43e83dc74b options: parse tls-related options as path 2025-05-21 14:43:24 +00:00
sfan5 e663cbc037 vo: move vo_mediacodec_embed to not be the default on Android 2025-05-03 18:13:35 +03:00
Guido Cella 01b51d1f72 options: add cue to --playlist-exts's defaut value 2025-04-17 21:40:04 +02:00
yumcookiez df1e71a7cc ytdl_hook: add option to extract chapters 2025-04-17 00:37:13 +02:00
Guido Cella 4dfe92fa27 console.lua: replace font script-opt with monospace_font
Allow configuring the monospace font without also changing the
proportional font. The proportional font is configured with the standard
--osd-font.
2025-04-17 00:13:19 +02:00
Guido Cella 42660a8c23 console.lua: say focused instead of selected
The selected term was causing confusion e.g. in
https://github.com/mpv-player/mpv/pull/15711#issuecomment-2676060139.
Saying either focused or current makes more sense since the item is not
actually selected until you click or press Enter.
2025-04-17 00:08:16 +02:00
Guido Cella d059f648fa console.lua: repurpose case_sensitive to only affect exact searches
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.
2025-04-17 00:01:27 +02:00
Guido Cella 4cb5f7aa1f console.lua: implement exact matching
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.
2025-04-17 00:01:27 +02:00
Kacper Michajłow bff0d59cbe stats.lua: set plot_{perfdata,vsync_ratio,vsync_jitter} to no
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.
2025-04-16 23:58:46 +02:00
Kacper Michajłow fd1007260c stats.lua: add stats-plot_cache script-opt
Allows to disable cache graphs on page 3 of stats.lua.

Fixes: #13894
2025-04-16 23:58:46 +02:00
llyyr f24611980c sub/osd: add osd-shaper and set it to simple by default
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
2025-04-16 23:58:02 +02:00
llyyr efba6e7e5a sub/sd_ass: add sub-{glyph-limit,bitmap-max-size} 2025-04-16 23:58:02 +02:00
llyyr fc972d2049 sub/osd: add osd-{glyph-limit,bitmap-max-size} 2025-04-16 23:58:02 +02:00
llyyr ad61018294 sub/osd: add osd-prune-delay 2025-04-16 23:58:02 +02:00
Tom Grimwood-Taylor a407e13f83 misc/language: add a forced flag to the track add commands 2025-03-31 11:47:52 +02:00
한승민 513ccb9227 DOCS/interface-changes/kitty-passthrough: option addition notice 2025-03-26 18:25:49 +01:00
Guido Cella e88864aef3 commands.lua: add remember_input script-opt
Allow clearing the input line on close. Fixes #16104.
2025-03-26 14:56:48 +01:00
sfan5 e48ac7ce08 Release 0.40.0 2025-03-25 18:33:27 +01:00
Guido Cella 0b3cc3a167 commands.lua: split this script out of console.lua
It was suggested by CogentRedTester in
https://github.com/mpv-player/mpv/pull/10282#issuecomment-1858727729 and
https://github.com/mpv-player/mpv/pull/10282#issuecomment-1858809580 and
by avih that making running commands an mp.input client is a better
architecture.

A practical advantage is that completions are calculated in a different
thread, which prevents hanging when completing slow/network filesystems.

script-binding console/enable becomes script-binding commands/open,
though the console one is kept as an alias. I took the opportunity to
rename this because open makes more sense for a graphical modal, and it
is the word used in mp.input and user-data.

script-message-to console type becomes script-message-to commands type,
though the console one is kept as an alias. It is also changed to
automatically close on submit without having to append '; keypress ESC'
as you don't need to keep the console open after running prefilled
commands.

Also convert to double quotes like other scripts and rename some
inconsistent functions.
2025-03-08 19:09:23 +00:00
Guido Cella ce6a52d40a console.lua: add history_path field to mp.input.get
This allows saving the history to all mp.input.get clients.

Needed to split running commands out of console.lua.
2025-03-08 19:09:23 +00:00
Guido Cella 05438fc081 console.lua: add autoselect_completion field to mp.input.get
This selects the first completion when pressing Enter when one wasn't
already manually selected.

Needed to split running commands out of console.lua.
2025-03-08 19:09:23 +00:00
Kacper Michajłow ecc31ecab3 player/command: add attached-picture flags to track add command 2025-03-08 00:21:06 +01:00
Kacper Michajłow 7b9290f620 player/command: add visual-impaired flags to track add command 2025-03-08 00:21:06 +01:00
Kacper Michajłow 3147eca943 player/command: convert flags to OPT_FLAGS for track add commands 2025-03-08 00:21:06 +01:00
Kacper Michajłow 7df3f442ea misc/language: parse hi/sdh/cc tags from external subtitle tracks
This also adds `hearing-impaired` argument to `sub-add` command.

Fixes: #14805
2025-03-08 00:21:06 +01:00
Kacper Michajłow 93ea3df0a9 player: add mpv:// protocol
This is useful to run mpv from URL handler. Can be used to start mpv
from you web browser or anything that would trigger url handler for
given protocol. Only safe protocols are allowed.

Current solutions to run mpv in such context are to spawn IPC proxy and
run mpv when requested, but this is in most cases not necessary.

Currently the protocol is added in mpv.desktop. Windows related
registration will follow in future changes.
2025-03-07 00:15:23 +01:00
Kacper Michajłow d2e3fd9383 auto_profiles.lua: make profiles apply with higher priority
This increases the priority from 50 (which is neutral) to ensure that
profiles are applied before other scripts.

In general, applying profiles before other scripts makes sense. This was
already the case for external scripts with default priority because they
would load after auto_profiles.

This commit primarily fixes ytdl_hook.lua to respond to profile changes.
In most cases, profile conditions are triggered by external conditions,
not the output from the ytdl hook, so this is fine.

I acknowledge that this will change the order if a script previously had
a priority lower than 50. However, injecting itself before profiles are
evaluated is a very obscure use case, if there is even a valid one.
2025-03-07 00:08:10 +01:00
Kacper Michajłow 1582705f27 demux_mkv: add demuxer-mkv-crop-compat option
I don't expect the Matroska specification to be adjusted for this to
work soon, so in the meantime, follow the spec as written and add an
option to support most files in the wild.

I would prefer this to never be an option, but it looks like it's
unavoidable.

Recently, FFmpeg added cropping support for Matroska, so we don’t want
to be the odd one out by doing it differently...

See for more details:
https://github.com/ietf-wg-cellar/matroska-specification/pull/947
https://gitlab.com/mbunkus/mkvtoolnix/-/issues/2389
https://github.com/mpv-player/mpv/pull/13446

Fixes: #15800
2025-03-04 19:33:27 +01:00
Guido Cella 996c098725 console.lua: add a keep_open flag to mp.input
With input.select this allows building nested submenus without the
flicker of console quickly closing and reopening, and also doing
multiple selections, to e.g. cycle through different values of a
property, or increase a property multiple times.

With input.get this is used to change the default behavior to closing by
default on submit. It was argued by avih that this is more useful, and
indeed Github code search shows that everybody is calling
input.terminate() unconditionally on submit, so the impact of the change
should be low, and restoring the old behavior is as easy as passing
keep_open = true, which is just ignored in older mpv versions.
2025-02-24 16:26:58 +01:00
nanahi 7dd5154971 clipboard: remove --clipboard-enable
Clipboard can be now disabled with --clipboard-backends-clr so
--clipboard-enable is redundant.
2025-02-24 16:23:41 +01:00
nanahi 8368d55282 clipboard: add --clipboard-backends option
This allows specifying a priority list of clipboard backends
to use. This is mostly useful on Linux where multiple clipboard
backends exist.
2025-02-24 16:23:41 +01:00
Guido Cella 978b219889 options: default to --prefetch-playlist=yes
--prefetch-playlist improves performance by starting to read the next
file in the last second or playback or while viewing an image. This is
obviously noticeable with playlists of direct media URLs, but can also
make a difference on local slow hardware, mainly large (in bytes) images
on HDDs. You can easily see the difference with 10+ MB images.

Since e7a253614c and 24db17d10f fixed niche issues, and it's known not
to cause other issues by users using since 2017 who haven't reported
issues, enable it by default to improve performance.

The only flaw is that it doesn't support ytdl-hook URLs, so in Youtube
playlist, it does a web request with ffmpeg that is doomed to fail since
the last second of playback, though this doesn't cause practical
disadvantages.
2025-02-24 15:54:33 +01:00
Yozora80 131973806d Revert "stream_{bluray,cdda,dvdnav}: deprecate setting device after schema"
This reverts part of PR #15899 (commit dd6e3a0ece).

"Why is this even useful?": It's very useful for multi-disc playlists. Compare:
`mpv bd:///DISC{1..4}`
`mpv -\{ bd:// --bluray-device=DISC1 -\} -\{ bd:// --bluray-device=DISC2 -\} -\{ bd:// --bluray-device=DISC3 -\} -\{ bd:// --bluray-device=DISC4 -\}`
2025-02-21 15:26:23 +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 bb3265b9d3 stream_cdda: deprecate undocumented --cdda-span-{a,b} options
You probably wouldn't guess what this does from the name alone, but it
actually selects a range of tracks to play. It's slightly different than
using --start because it confines the range to just that track and you
cannot seek before it. The functionality is useful, but you can
accomplish exactly the same thing with --start and --end. Also the
implementation of the cdda option is weird because starting from a track
after 1 makes it impossible to seek before it. There's no reason to have
this when using the core option is simply better and works fine.
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
nanahi 66a7338027 f_decoder_wrapper: warn when using video-aspect-override of 0 or -1 2025-02-18 23:05:02 +00: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