1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-17 21:27:08 +00:00
Commit Graph

12116 Commits

Author SHA1 Message Date
Guido Cella
1a558bf5c2 osc.lua: remove NIH list formatting
All of the code to format playlist/track-list/chapter-list is
unnecessary when mpv's core can already show-text these properties.

Also an issue with this custom formatting is that showing fewer entries
than can fit on the OSD can make it seem like the playlist ends there
and there are no entries afterwards.

Also remove lots of pointless code around the track-list (mpv's track id
and the osc_id are exactly the same).

This simplification will make it easier to bind customizable commands,
otherwise yet another script message to call set_track would have to be
added, when cycle sub/audio already output information about the new
track on their own.
2024-10-16 15:10:23 +02:00
Guido Cella
65135e0f44 DOCS/input: list property values are not useless
The raw value of these properties is definitely not useless since they
return the whole list.
2024-10-16 15:10:23 +02:00
Guido Cella
3522dd836e command: implement printing ${track-list/{video,audio,sub}}
This brings show-text ${track-list} in line with osc.lua's
get_tracklist(type) before replacing it with show-text.
2024-10-16 15:10:23 +02:00
Guido Cella
23e774d514 input.conf: bind ? to show key bindings
This should help new users to view mpv's key bindings as it's easier to
discover than shift+i and 4, because many other websites and terminal
applications show key bindings upon pressing ?.
2024-10-14 20:33:27 +02:00
nanahi
da0160b0ee input/cmd: add nonscalable prefix
Some keys like WHEEL_UP are "scaled" if the input source is high
resolution, like touchpad. However, sometimes it's desirable to
disable this scaling and only active the key binding in discrete
steps, such as relative keyframe seeking which interacts poorly
if the command is scaled.

This adds the nonscalable prefix to disable this scaling.
2024-10-14 01:55:49 +02:00
Kacper Michajłow
bf025cd289 msg: allow to truncate the message to terminal width 2024-10-11 15:16:33 +02:00
norinoriko
ee4402feca DOCS/man/options.rst: add gpu-next differences to --scale-antiring 2024-10-10 18:52:40 +02:00
Guido Cella
6ed3781a3d ytdl_hook.lua: add include script-opt of URLs to try with ytdl first
By the default mpv tries opening URLs with ffmpeg first, and users who
don't configure try_ytdl_first get a slower startup for youtube URLs, on
top of yt-dlp already being slow.

Fix this by adding a script-opt of URL pattern to try with ytdl first.
Youtube and twitch are included by default.

Compared to the alternative of trying ytdl first by default and
excluding URLs with a media extension, this only works for the sites
explicitly included in the new option's value, but doesn't have false
positives on media URLs without an extension.
2024-10-09 01:08:31 +02:00
Guido Cella
92403a068c ytdl_hook.lua: lower case URLs for exclude matching 2024-10-09 01:08:31 +02:00
Guido Cella
8bf5548589 console.lua: allow clicking selectable items
This adds click support for the select menu. Scrolling with the wheel
already worked.

If a custom OSC binds a button to a select.lua script-binding, this lets
users keep using the mouse to select an item.

While the OSC and the select menu are open at the same time, you can no
longer click the OSC's buttons. By using mp.add_key_binding instead of
add_forced_key_binding you could click both, but the console's binding
would be shadowed by MBTN_LEFT bindings in input.conf.
2024-10-08 20:37:56 +02:00
der richter
c5324cc483 DOCS/input: clarify display-names naming on macOS
this was meant to refer to round brackets and not square brackets.
2024-10-06 21:53:08 +02:00
Kacper Michajłow
f7a895e7c1 docs: remove stray newlines 2024-10-06 21:51:59 +02:00
Kacper Michajłow
1b08e8b08e ci/{openbsd,win32}: bump FFmpeg to 7.1 2024-10-06 21:51:12 +02:00
Dudemanguy
e01eab4385 win_state: move window centering to vo_calc_window_geometry
c4e8c36071 made any usage of --geometry
implicitly center the window on the screen after a resize even if the
user did not pass any x/y arguments to the option. At the time, this was
probably wanted since --geometry was primarily a startup option and
likely the window wouldn't be centered on x11 without moving
coordinates. Times have changed since then and we support full runtime
--geometry changes on all the relevant platforms but it comes with this
automatic window centering behavior (except on wayland of course hah).

It's better to make such window centering optional and user controllable
since it is entirely reasonable that someone wants --geometry=50% to
just resize and not move anything. It's already trivial for a person
that does want to move the window to just add their coordinates to the
--geometry command so there's no reason to continue to force this
behavior since it is less flexible.

Instead, move the window centering stuff out of m_geometry_apply into
vo_calc_window_geometry. We give the power to the caller to whether or
not to force centering the window here and all usage of the function is
updated to simply call it with false for now. Additionally,
--force-window-position being set will also center the window like
before. All that is left is for the windowing code to take advantage of
this. See subsequent commits.
2024-10-05 18:40:11 +00:00
Guido Cella
493cab7efc stats.lua: allow keybindings to toggle the display of a specific page
This lets you define bindings like h script-binding
stats/display-page-4-toggle. Requested in #14966.
2024-10-04 21:13:29 +03:00
Kacper Michajłow
6ca3752f75 vf_d3d11vpp: add NVIDIA RTX Video HDR support
Fixes: #13352
2024-09-30 02:51:21 +02:00
llyyr
d33bcc51a7 command: add video-frame-info/{gop,smpte,estimated-smpte}-timecode
Co-authored-by: Kacper Michajłow <kasper93@gmail.com>
2024-09-24 19:47:42 +02:00
nanahi
b08cab7a6c DOCS/man/mpv.rst: clarify configuration files should be UTF-8
mpv only supports UTF-8 for configuration files. Other ASCII-compatible
encodings may "work" to some limited extent, but strings likely won't
as many places assume that all internal strings are UTF-8.
2024-09-24 19:22:47 +02:00
sfan5
a0fba7be57
Release 0.39.0 2024-09-23 19:36:41 +02:00
Maxim Biro
ff47926d6a ytdl_hook: make path and json available to other scripts
It's useful for user scripts to be able to use the same ytdl binary that
ytdl_hook uses without having to replicate ytdl_hook's process of
searching for the ytdl binary.

Some user scripts might also find it useful to be able to access ytdl's
json output that the ytdl_hook already receives, sparing user scripts
from having to make a duplicate ytdl binary invocation to get the json
output.

Providing just the json output is not enough though, as ytdl doesn't communicate
errors though it -- if an error occurs, ytdl provides no json output and instead
prints to stderr. So without stderr, there is no way for user scripts to figure
out why ytdl has failed: no such username / video id, the channel is not live
yet, etc. Because of that, the entire result of the subprocess call is provided
to the user scripts, containing stdout (json), stderr, ytdl's exit code, etc.
2024-09-21 17:53:01 +02:00
Oneric
7431896cd1 DOCS/man/options.rst: further tweak sub-ass-use-video-data description 2024-09-19 13:55:50 +00:00
Kacper Michajłow
6133033e33 DOCS/man/options.rst: fix nono typo
Fixes: f1f091759a
2024-09-15 19:20:23 +02:00
nanahi
f1f091759a DOCS/man/options.rst: clarify sub-ass-use-video-data a bit 2024-09-15 18:46:44 +02:00
nanahi
d245e9dc8c DOCS/interface-changes: fix format for sub-ass-use-video-data 2024-09-15 18:46:44 +02:00
Philip Langdale
429e379c7f DOCS/man/options.rst: update description of hwdec=auto behaviour
When I introduced the behaviour of `auto` trying every hwdec down the list
instead of giving up after the first one fails, I forgot to update this
part of the docs.
2024-09-14 19:35:31 -07:00
Oneric
5357d18fe6 sub: add ass-video-aspect-override option
It is unclear whether there actually is any usecase for this option
which isn't better served by sub-ass-use-video-data and/or LayoutRes
overrides, but prior to the introduction of sub-ass-use-video-data
it was possible to pass along storage resolution while faking an
aspect ratio of 1:1.
sub-ass-video-aspect-override=1 combined with sub-ass-use-video-data=all
now makes this possible again.

The uper limit of a 10:1 aspect matches
the general video-aspect-override option.
2024-09-13 23:24:08 +02:00
Oneric
207b1a2c91 sub: merge vsfilter-aspect and vsfilter-blur-compat options
The naming for "blur-compat" was misleading since the setting
actually affects more than just blur affects. Additionally
forwarding storage resolution but forcing an aspect ratio
of 1.0 for the video is likely to result in odd rendering
and there’s no known usecase for it.

Both options control which video properties are exposed to libass
so to fix the aforementioned issues merge these settings into one
tri-state sub-ass-use-video-data.

The default V keybind now cycles through all states of
use-video-data instead of toggling vsfilter-aspect-compat.

Resolves: https://github.com/mpv-player/mpv/issues/10680
2024-09-13 23:24:08 +02:00
norinoriko
ecc6cddef0 DOCS/man/options: update defaults for --hwdec-codecs
`prores` was added to the whitelist in 629b637406.
2024-09-04 18:46:30 -04:00
bodayw
db19dbca5c DOCS/man/options: fix deinterlacing typo 2024-09-04 16:27:53 +02:00
Kacper Michajłow
c2997aa7de vf_d3d11vpp: add output format selection 2024-09-01 19:41:41 +02:00
Kacper Michajłow
7398e755d1 DOCS/vf: update obsolete note hwdec in d3d11vpp
mpv has ability to upload frames.
2024-08-27 01:27:48 +02:00
llyyr
cb4fdb530a video/csputils: remove space from choice option for chroma loc
Also document the field
2024-08-24 17:11:39 +02:00
llyyr
488c636a71 DOCS/man/vf: don't document removed vf_format field
This field was removed in c6b9288465

Reported-by: burgerga
2024-08-24 17:11:39 +02:00
Kacper Michajłow
2848af5618 vf_d3d11vpp: add support for Intel VSR and NVIDIA RTX scaling modes
Adds `--vf=d3d11vpp=scaling-mode` to control which extensions should be
enabled.

Fixes: #11390
Co-authored-by: xc <wxc9312@gmail.com>
2024-08-20 03:34:08 +02:00
Kacper Michajłow
bbb3d5ba78 vf_d3d11vpp: add support for scaling
Adds `--vf=d3d11vpp=scale` to scale video using d3d11 video processor.

Co-authored-by: xc <wxc9312@gmail.com>
2024-08-20 03:34:08 +02:00
nanahi
67e087dcae DOCS/man/options.rst: add a note about the effective limit of --pitch 2024-08-19 15:37:08 +02:00
nanahi
ec125d6fc6 DOCS/man/mpv.rst: add documentation for the numpad volume key bindings 2024-08-19 15:37:08 +02:00
nanahi
365708cf32 DOCS/interface-changes: fix KP_DIVIDE typo 2024-08-19 15:37:08 +02:00
Guido Cella
ebc14a58ae console.lua: implement history search 2024-08-16 18:32:58 +02:00
nanahi
f3a00ea131 various: handle numpad add/subtract/multiply/divide keycodes 2024-08-11 15:08:42 +02:00
Kacper Michajłow
4e50da3ddc demux_playlist: use --directory-filter-types for --autocreate-playlist 2024-08-10 23:27:40 +02:00
Kacper Michajłow
b73445dcf3 demux_playlist: add only media files when opening directory 2024-08-10 23:27:40 +02:00
Kacper Michajłow
44a3a3293f options: add --{video,audio,image}-exts 2024-08-10 23:27:40 +02:00
Kacper Michajłow
4f1e9e34c3 demux_playlist: add --directory-filter-types 2024-08-10 23:27:40 +02:00
Kacper Michajłow
c54ad6933b demux_playlist: add --autocreate-playlist-{video,audio,image}-exts 2024-08-10 23:27:40 +02:00
Dudemanguy
70fad1daa6 DOCS/man: improve explanation on how to shift notes with --pitch
Previously, this was in the rubberband filter but it gives out random
numbers without explaning where they come from. Move it to the --pitch
section instead and reword it a bit. Closes #14652.
2024-08-09 14:22:23 +00:00
Mike Will
88885c0401 audio: add pitch-shifting feature
Uses resampling in tandem with a time-stretching audio filter to
change the audio's pitch while leaving its tempo intact.
2024-08-07 22:56:17 +02:00
nanahi
9133ce7623 DOCS/man/input: document user-data/osc/margins
This property is used by the built-in OSC and some third-party OSC scripts
to indicate the margin they occupy so that other scripts such as
console.lua can use this value to position UI elements.
2024-08-06 20:28:44 +02:00
nanahi
d302fe0de5 DOCS/man/input: reserve user-data/osc and user-data/mpv sub-paths
Currently user-data/osc is used for interpolation between the osc and
other internal scripts. Reserve this sub-path and also user-data/mpv
to make sure external scripts can only use these values as directed.
New internal uses of user-data should use user-data/mpv instead.
2024-08-06 20:28:44 +02:00
Kacper Michajłow
6f619d5ef4 vo_libmpv: don't steal pointer provided by the API user
It won't be TA allocated and would fail on header check. Also
documentation doesn't mention that ownership is transfered to mpv, so it
is unexpected.

This will cause existing clients of this API leak this memory, but I
doubt anyone really used it in this broken state.

Fixes: #14633
2024-08-06 20:17:35 +02:00