Commit Graph
12390 Commits
Author SHA1 Message Date
rkscv 5f8d5f8e8b DOCS/man/lua: fix spacing issues 2025-06-29 11:41:44 +02:00
sfan5 6c6e81314a DOCS/libmpv: clarify that handle used by cplugin cannot be destroyed 2025-06-02 15:59:05 +02:00
Patrick Wang 43e83dc74b options: parse tls-related options as path 2025-05-21 14:43:24 +00:00
Ryan Hendrickson 3baf2e1ef8 DOCS/man/options: equivalent -> analogous 2025-05-08 00:45:57 +02:00
sfan5 e663cbc037 vo: move vo_mediacodec_embed to not be the default on Android 2025-05-03 18:13:35 +03:00
nanahi 26cb87a2d7 DOCS/man/input: add documentation for Wayland and macOS clipboard write
Wayland clipboard writing is added. macOS clipboard writing was
already implemented but it was forgotten to update the documentation.
2025-04-22 22:07:48 +00:00
Guido Cella 01b51d1f72 options: add cue to --playlist-exts's defaut value 2025-04-17 21:40:04 +02:00
llyyr 0dc24a2301 sub/osd: set osd-shaper to complex by default
I'd rather not argue about which is better so go back to status quo,
users can use the more sensible option of "simple" if it doesn't break
anything (which it won't).

Using simple has benefits of growing memory usage slower and much faster
OSD rendering when complex isn't needed.

Simple breaks rendering complex glyphs like Material font icons

Fixes: https://github.com/tomasklaen/uosc/issues/1086
Fixes: f24611980c ("sub/osd: add osd-shaper and set it to simple by default")
2025-04-17 15:44:15 +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
Kacper Michajłow 6a96b15cf4 video/csputils: add missing alpha choice 2025-04-17 00:07:39 +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
llyyr 4697f7cb86 DOCS/man/mpv: document alt+v to toggle secondary sub track visibility
Fixes: 62f225ef9d ("sub/osd: hide secondary subtitles if secondary-sub-visibility is false")
2025-04-15 11:46:37 +02:00
Guido Cella 91337443ad DOCS/man/options: fix link to Conditional auto profiles 2025-04-12 20:32:10 +02:00
Guido Cella 12b3de21c4 DOCS/man/input: remove reference to the removed --clipboard-enable 2025-04-12 20:32:10 +02:00
Guido Cella 150b6d7b90 DOCS: remove references to the removed slave mode 2025-04-12 20:32:10 +02:00
Guido Cella f0c3d466f9 DOCS/man/osc: fix custom button example formatting
The examples for each button were rendered in the same line.
2025-03-31 12:02:03 +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
sfan5 08939665fe DOCS: clarify some minor points in the release policy 2025-03-28 16:19:48 +01:00
Lynne 9964104a6e vd_lavc: enable FFv1 hwaccel by default
FFmpeg recently got a hardware accelerated decoder for FFv1.
The decoder has been tested on all major vendors and operating systems.
Intel support is currently disabled as all of their drivers have issues
with buffer device addresses.
Since its a software-defined implementation, internal issues can be fixed
and the overall implementation optimized further.

With that, I think it should be safe to enable it by default.
2025-03-26 18:40:58 +01:00
한승민 513ccb9227 DOCS/interface-changes/kitty-passthrough: option addition notice 2025-03-26 18:25:49 +01:00
한승민 d9dc84c0fc vo_kitty: add auto-multiplexer-passthrough option
Terminal multiplexers like (screen, tmux, ...) do not support the kitty
image protocol (as of yet), to go around this DCS escape sequences are
used (`\ePtmux;...\e\` for tmux, `\eP...\e\` for screen). This option
allows passing thorugh the kitty image escape sequences.

`\033\\` suffixes from `KITTY_ESC_IMG_SHM` and `KITTY_ESC_DELETE_ALL`
have been removed. This makes it easier to wrap the escape sequences in
a DCS control sequence since there will be no `\033` in them to escape
(as multiplexers require escaping the escapes within the DCS data
string). `DCS_GUARD_WRITE` and `DCS_GUARD_APPEND` macros have been added
to wrap escape sequences in DCS control sequence based on the
availability of the `priv->dcs_prefix` property.
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
nanahi e70d67f7ca DOCS/man/options: remove bogus messages about the client API
The messages referred to "no" prefixes like --no-audio not working with
the client API. The language was removed in
b1ee92ad4a.

Remove the messages which are bogus and incorrect now.
2025-03-26 01:29:52 +01:00
sfan5 e48ac7ce08 Release 0.40.0 2025-03-25 18:33:27 +01:00
sfan5 425037a16a DOCS: refresh some parts of the release policy 2025-03-25 17:57:53 +01:00
Kacper Michajłow 8e4493b4a2 Revert "input.conf: bind MBTN_MID to align-to-cursor"
It can be too easy to change the video position without a single way to
undo the change. Also, this is mostly useful for images. Binding can be
brought back in a better way with an image profile or another method
that is more resistant to accidental clicks.

This reverts commit e98d3b62ec.
2025-03-23 22:49:00 +01:00
verygoodlee ae3420fe66 DOCS/man/input: correct the mode flag of apply-profile command
The default mode actually named `apply` instead of `default`,
it's a mistake that has existed for a long time.
2025-03-12 10:50:32 +01:00
llyyr 4b1315a67f DOCS/man/input: remove stray newline
this breaks the html conversion
2025-03-09 10:56:15 +01:00
Guido Cella e28c6ceea3 console.lua: default to --osd-font without completions
Currently --osd-font is the default for select, and a monospace font is
the default for free-form text mode. We can also default to the
proportional --osd-font for mp.input.get clients that don't specify
completions and thus don't need alignment, which is most clients.

In builtin scripts, this is the case for filtering stats key bindings.
2025-03-08 19:09:23 +00: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
Guido Cella 3c175f0114 console.lua: let the complete callback return a character to append
Let the complete callback return the character to append to the selected
completion.

I didn't want to document this because it's specifically meant for
properties and unlikely to be needed by other scripts, but silently
interpreting the 3rd return value can screw you over if you do something
like

return candidates, code:find('[%w_]*$')

I was doing this in my lua-repl script, and find() returns the end
position as the 2rd argument, this becomes the 3rd return value and gets
appended to completions. So you have to do

return candidates, code:find('[%w_]*$'), nil

Needed to split running commands out of console.lua.
2025-03-08 19:09:23 +00:00
Guido Cella c7e62ee28c DOCS/man/lua: update complete docs referencing autocompletion 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 45c6077756 stream_mpv: restrict only to network links 2025-03-07 14:19:15 +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