0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00
Commit Graph

442 Commits

Author SHA1 Message Date
sfan5
df758880e2 path: don't override "cache" and "state" paths with configdir
This reverts commit 576e86bfa1 (functionally).

Right now, the --config-dir option silently causes all watch_later and cache
files to be written in the --config-dir as well. This is pretty uninitutive
and also not desirable in most cases so get rid of this.
libmpv users will have to set the corresponding options or env vars if they
want to keep the old behaviour.
2023-10-02 18:48:10 +02:00
Dudemanguy
c4c70d8efe DOCS/interface-changes: also mention --window-affinity
Added in 2c738ca54b. I guess we seem to
always mention any added option these days so might as well.
2023-10-01 12:52:35 -05:00
Kacper Michajłow
d64201ce29 DOCS/interface-changes: mention --backdrop-type
Added in f19ada7b58
2023-10-01 17:05:34 +00:00
Dudemanguy
1d00aee8e1 command: deprecate shared-script-properties
user-data is simply better.
2023-09-27 14:04:59 +00:00
Niklas Haas
44cf6288c7 vo_gpu: remove --scaler-lut-size
Pointless bloat option, hard-coded as 256 now in libplacebo and no
reason not to also hard-code in mpv.

See-Also: haasn/libplacebo@64d7c5aab0
2023-09-25 12:45:17 +02:00
Niklas Haas
57fad2d5f9 vo_gpu: remove --scale-cutoff etc
Pointless bloat option, hard-coded as 1e-3 now in libplacebo and no
reason not to also hard-code in mpv.

See-Also: haasn/libplacebo@64d7c5aab0
2023-09-25 12:45:17 +02:00
Dudemanguy
6ea9ec9931 stream_cdda: move cdrom-device to cdda_params
There is zero reason for this to be an MPOpt. Because of how the
OPT_SUBSTRACT works, the option gets renamed to cdda-device instead, but
probably not a big deal since the old alias is still in place.
2023-09-22 14:20:38 +00:00
Kacper Michajłow
804eb80e78 win32: add --window-corners
Allows to set preference for window corners rounding for DWM.
2023-09-21 23:13:19 +00:00
Kacper Michajłow
ee24dd0419 win32: add an option to control window title bar state
Fixes: #11432
2023-09-21 23:13:19 +00:00
Dudemanguy
be89e07229 drm: remove selecting the card number with --drm-connector
f560437594 deprecated this since the
--drm-device path option was added as a replacement. Drop the card
number selection logic.
2023-09-21 16:06:29 +00:00
Dudemanguy
177fe48d79 options: remove --vf-defaults and --af-defaults
These were deprecated a long time ago and apparently didn't even work
with lavfi filters. Go ahead and remove them and additionally clean up
some code related to them. m_config_from_obj_desc_and_args becomes much
simpler now and a couple of arguments can be completely removed.
2023-09-21 16:06:29 +00:00
Dudemanguy
fb46666395 options: remove deprecated --record-file option
No wonder wm4 wanted to get rid of this. This option requires touching a
bunch of crap in the core player code. --stream-record works perfectly
fine and is a lot nicer so there's no need for this to exist anymore.
2023-09-21 16:06:29 +00:00
Dudemanguy
36ea5d7b5c options: remove a few options marked with .deprecation_message
A bit different from the OPT_REPLACED/OPT_REMOVED ones in that the
options still possibly do something but they have a deprecation
message. Most of these are old and have no real usage. The only
potentially controversial ones are the removal of --oaffset and
--ovoffset which were deprecated years ago and seemingly have no real
replacement. There's a cryptic message about --audio-delay but who
knows. The less encoding mode code we have, the better so just chuck
it.
2023-09-21 16:06:29 +00:00
Dudemanguy
4b2276b730 command: stop restarting playback when writing to playlist-pos
e9e93b4dbe added a warning about writing
the same value to the playlist-pos property that in the future it would
stop restarting playback. Instead, you should use the
playlist-play-index command for that. Well go ahead and drop the old
deprecated behavior now and do what wm4 wanted this to do: just ignore
if the same value is written again.
2023-09-21 16:06:29 +00:00
Dudemanguy
29b481da54 command: remove some old deprecated properities
drop-frame-count and vo-drop-frame-count are ancient and have no reason
to exist anymore. The other change is that support for writing to
display-fps has been removed, and the property is strictly read-only
now. 3a2dc8b22e is what deprecated it with
a warning to users, so we can remove it without much trouble.
2023-09-21 16:06:29 +00:00
Dudemanguy
969c19c9cb options: remove ancient option fallbacks/deprecation
We've got an ungodly amount of OPT_REPLACED and OPT_REMOVED sitting
around in the code. This is harmless, but the vast majority of these are
ancient. 26f4f18c06 is the last commit
that touched the majority of these and of course that only changed how
options were declared so all of this stuff was deprecated even before
that. No use in keeping these, so just delete them all. As an aside,
there was actually a cocoa_opts but it had only a single option which
was replaced by something else and empty otherwise. So that entire thing
was just simply removed. OPT_REPLACED/OPT_REMOVED declarations that were
added in 0.35 or later were kept as is.
2023-09-21 16:06:29 +00:00
Dudemanguy
96a6c1ae91 builtin.conf: remove deprecated opengl-hq profile
Deprecated in 65979986a9. 6 years is more
than enough time.
2023-09-21 16:06:29 +00:00
Guido Cella
6b09525157 demux_playlist: add --directory-mode=auto
This is a more useful default with --shuffle.
2023-09-21 14:57:11 +00:00
Niklas Haas
2fd5b9b4dd vo_gpu: match libplacebo debanding defaults
The defaults were awful and horribly regressed many files while also not
fixing banding on files that actually needed it, sometimes even
*increasing* banding due to the low threshold.

Fixes: 12ffce0f22
See-Also: haasn/libplacebo@e1e43376d1
2023-09-20 20:26:07 +02:00
Niklas Haas
e7bd330ed0 vo_gpu: match libplacebo peak detection defaults
This probably makes `vo_gpu` tone mapping worse, or something, but who
cares. The status quo for a while now has been to use `vo_gpu_next` if
you care about HDR rendering at all.

See-Also: haasn/libplacebo@ec60dd156b
See-Also: haasn/libplacebo@0903cbd05d
2023-09-20 20:26:07 +02:00
Niklas Haas
c172a650c4 vo_gpu: default to dscale=hermite
This new filter is slightly sharper, and significantly faster, than
mitchell. It also tends to preserve detail better. All in all, there is
no reason not to use it by default, especially from a performance PoV.
(In vo_gpu_next, hermite is implemented efficiently using hardware
accelerated bilinear interpolation)

See-Also: 75b3947b2c
2023-09-20 17:07:38 +02:00
Kacper Michajłow
703f158880 builtin.conf: modernize internal profiles
The goal is to provide simple to understand quality/performance level
profiles for the users.

Instead of default and gpu-hq profile. There main profiles were added:
    - fast: can run on any hardware
    - default: balanced profile between quality and performance
    - high-quality: out of the box high quality experience. Intended
      mostly for dGPU.

Summary of three profiles, including default one:

[fast]
scale=bilinear
cscale=bilinear (implicit)
dscale=bilinear
dither=no
correct-downscaling=no
linear-downscaling=no
sigmoid-upscaling=no
hdr-compute-peak=no

[default] (implicit mpv defaults)
scale=lanczos
cscale=lanczos
dscale=mitchell
dither-depth=auto
correct-downscaling=yes
linear-downscaling=yes
sigmoid-upscaling=yes
hdr-compute-peak=yes

[high-quality] (inherits default options)
scale=ewa_lanczossharp
cscale=ewa_lanczossharp (implicit)
hdr-peak-percentile=99.995
hdr-contrast-recovery=0.30
allow-delayed-peak-detect=no
deband=yes
scaler-lut-size=8
2023-09-19 22:26:56 +02:00
Kacper Michajłow
7e692ee490 vo: change tscale to oversample by default
Keep it sharp, let users opt-in more blurry result.
2023-09-19 22:26:56 +02:00
Kacper Michajłow
4bedcd36f6 vo: make cscale follow scale by default 2023-09-19 22:26:56 +02:00
Kacper Michajłow
8121d41245 vo: enable correct-downscaling, linear-downscaling, sigmoid-upscaling 2023-09-19 22:26:56 +02:00
Dudemanguy
7a76cf4d65 demux: prepend some cache options with demuxer
--cache-dir is an awful name that leads to confusion (see #12418).
Change the name to --demuxer-cache-dir and --demuxer-cache-unlink-files
instead.
2023-09-18 17:13:15 +00:00
llyyr
1c09ee44c3 filter_kernels: remove bcspline filter
After fixing the B and C params for bcspline, it ended up being the same
thing as bicubic. There's no reason to have two names for the same
filter, so remove bcspline and keep bicubic to match libplacebo.
2023-09-18 17:44:18 +02:00
Niklas Haas
bc35180933 vo_gpu: remove --scale-wblur etc
No need for this since it's entirely redundant with just changing the
filter radius directly. In fact, that's the whole *point* of the filter
radius - it does not modify the filter, it modifies the scaling of the
window.

Of course, this does not work for non-resizable kernels. But, really,
who cares?
2023-09-16 14:33:45 +02:00
Niklas Haas
a24aa6b8f7 filter_kernels: add ewa_lanczos4sharpest
Mainly for vo_gpu_next.
2023-09-16 14:33:45 +02:00
Niklas Haas
40de03fdba vo_gpu: vo_gpu_next: support --icc-3dlut-size=auto
And make it the default. In libplacebo, this uses internal heuristics to
pick a good size based on the actual ICC characteristics. This is
significantly less wasteful than always generating a 64x64x64 3DLUT (the
old status quo).

In vo_gpu, for simplicity, just default to 65x65x65. Note that this
provides slightly better accuracy than the old default of 64x64x64 for
technical reasons, and matches what libplacebo defaults to for typical
display profiles.
2023-09-15 10:58:37 +02:00
Kacper Michajłow
f5690e3c97 Revert "sub: add auto option to --sub-fix-timing"
This reverts commit b47a58516a.
2023-09-11 01:58:07 +00:00
Dudemanguy
fe875083b3 player: redo --subs-fallback-forced
In the never ending quest of trying to satisfy every possible user
request for subtitle autoselection, I ended up redoing how
--subs-fallback-forced works. The old behavior had it as strictly a
fallback-type option when there were no lang matches, but now we can
make it an active part of compare_track and it works along with slang to
select the desired track. Since it's a three state option, the no option
still works to avoid selecting any forced subtitle tracks. The meaning
of always slightly changes to mean "only select forced subtitle tracks"
and yes remains essentially the same (no special priority given besides
the audio matching subtitle language case).
2023-09-09 02:48:53 +00:00
Dudemanguy
b47a58516a sub: add auto option to --sub-fix-timing
Third try is the charm? I stupidly missed that this option already
existed in my previous commits. Instead, add an auto value to it and
enable it by default for sd_lavc but not sd_ass. On my limited samples,
it seems to fix the gaps issue that can occur but without regressing
some duration timings for sub_lavc subtitles. Well hopefully anyway.
Fixes #12327.
2023-09-07 09:27:31 -05:00
llyyr
f52056b76d Revert "aspect: change --video-pan-x/y to be relative to the destination rect"
There are way too many preexisting scripts that rely on this behavior
for video panning, like for example scripts that allow you to use mpv as
an image viewer. If this behavior is desired then it may be better to
add a new option for panning relative to the destination instead.

The restriction of video-pan-x/y being clamped to {-3, 3} also results
in the video being impossible to pan if it was zoomed in beyond a
certain degree.

This reverts commit 7d6f9e3739.
2023-09-02 16:18:31 +00:00
Niklas Haas
b4c98cb04c vo_gpu: remove --tone-mapping-mode
`--vo=gpu-next` no longer uses this option, being replaced entirely by a
luminance-based approach internally. And even for `--vo=gpu`, the values
other than 'hybrid' are universally inferior in quality.

In the interest of gradually reducing the amount of option bloat here,
remove this mostly-pointless option.
2023-09-01 21:02:19 +02:00
Kacper Michajłow
c9c9822289 player/command: add video-params/crop-[w,h,x,y] 2023-08-31 17:37:42 +00:00
Kacper Michajłow
f3f1a79fe3 vo: add --video-crop
Just cropping by VO that works with hwdec.

Fixes: #12222
2023-08-31 17:37:42 +00:00
Kacper Michajłow
3ab5401b38 player/command: remove video-aspect property
4 years is enough of deprecation period.
2023-08-31 17:37:42 +00:00
Guido Cella
edd7189a72 demux_playlist: default to --directory-mode=lazy
64959c450d solved the problems with resuming playback, so default to
--directory-mode=lazy because it's faster, especially on slow drives,
and results in smaller playlists.
2023-08-30 15:46:57 +00:00
Kacper Michajłow
3cf71fd7c7 command: add hdr-metadata property 2023-08-29 20:58:44 +02:00
Dudemanguy
a062f115a1 command: remove sub-forced-only-cur property
Since we no longer have the auto choice, this is always exactly equal to
the value of the option (sub-forced-events-only). Remove the property
and alias it.
2023-08-29 16:39:00 +00:00
Dudemanguy
9b9475e218 player: rename --sub-forced-only to --sub-forced-events-only
The old name is pretty bad and users mistakenly think it has something
to do with selecting forced subtitles (that would be
--subs-fallback-forced). Instead of giving it such a generic name, make
it clearer that this has to do specifically with forced sub events
which is only relevant for a small minority of subtitles.
2023-08-29 16:39:00 +00:00
Dudemanguy
4009e99b9c player: remove auto choice from sub-forced-only
First of all, this never worked. Or if it ever did, it was in some
select few scenarios. c9474dc9ed is what
originally added support for the auto choice. However, that commit
worked by propagating a value to a fake option used internally. This
shouldn't have ever worked because the underlying m_config_cache was
never updated so the value shouldn't have been preserved when accessed
in sd_lavc. And indeed with some testing, the value there is always 0
unsurprisingly.

This was later rewritten in ba7cc07106
along with a lot of other sub changes, but with that, it was still
mostly broken. The reason is because one of the key parts of having to
hit this logic (prefer_forced) required `--no-subs-with-matching-audio`
to be set. If the audio language matches the subtitle language (the
requirement also excludes forced subs), the option makes no subtitle
selection in the first place so pick->forced_only_def is not set to true
and nothing even happens. Another way around this would be to attempt to
change your OS language (like with the LANG environment variable) so
that the subtitle track gets selected but then audio_matches mistakenly
becomes false because it compares the OS language to the audio language
which then make preferred_forced 0, so nothing happens. I don't think
there's a scenario where pick->forced_only_def is actually set to true
(thus meaning `auto` is useless), but maybe someone could contrive
something very strange. Regardless, it's definitely not something even
remotely common.

fbe8f99194 changed track selection again
but didn't consider this particular case. The net result is that DVD/PGS
subs become equivalent to --sub-forced-only being yes, so this a change
in behavior and probably not a good one. Note that I wasn't able to
actually observe any difference in a PGS sample. It still displayed
subtitles fine but that sample probably didn't have the right flags to
hit the sub-forced-only logic.

Anyways, the auto feature is extremely questionable at best and in my
view, not actually worth it. It is meant to be used with
`--no-subs-with-matching-audio` to display forced pictures in subtitle
tracks that are not marked as forced, but that contradicts that
particular option's purpose and description in the manual (secretly
selecting a track under certain conditions even though it says not to).

Instead of trying to shove all this logic into select_default_track
which is already insanely complicated as it is, recognize that this is a
trivial lua script. If you absolutely want to turn --sub-forced-only on
under these certain conditions (DVD/PGS subtitles, matching audio and
subtitle languages, etc.), just look at the current-tracks property and
do your thing. The very, very niche behavior that this option tried to
accomplish basically never worked, no user even knows what this option
does, and well it's just not worth supporting in core mpv code. Drop
all this code for sanity's sake and change --sub-forced-only back to a
bool.
2023-08-29 16:39:00 +00:00
Dudemanguy
165f9e061f player: add always to --subs-fallback-forced
In general, forced tracks should only be shown if they match the
language of the audio. However some people do want them no matter what,
so add an always option to this so such tracks are always selected.
2023-08-28 18:43:46 +00:00
Dudemanguy
58ec0630f5 player: add --subs-match-os-language option
This is the replacement for the previous auto option for slang. It
behaves similar however it never overrides slang if that is set and will
instead try to pick the subtitle that matches the user's language if
appropriately flagged by the file.
2023-08-28 18:43:46 +00:00
Dudemanguy
53d032374d player: remove special auto option from alang/slang/vlang
This proved to be too problematic. Depending on the value of
--subs-with-matching-audio, you could either end up with cases where
--slang wasn't respected and users didn't get subtitles or alternatively
cases where subtitles were given and the user didn't ask for them.
Fundamentally, the OS language functionality doesn't really map well to
slang (and for alang/vlang it makes zero sense; not that anyone actually
used it). Instead of trying to shove it in an option where it doesn't
belong, we should split this off into something else. So for now, just
remove the special handling of "auto" and flip slang back to NULL.
2023-08-28 18:43:46 +00:00
Dudemanguy
32be72623b player: make all autoload extensions configurable
--audio-file-auto, --cover-art-auto, and --sub-auto all work by using an
internally hardcoded list that determine what file extensions get
recognized. This is fine and people periodically update it, but we can
actually expose this as a stringlist option instead. This way users can
add or remove any file extension for any type. For the most part, this
is pretty pretty easy and involves making sub_exts, etc. the defaults
for the new options (--audio-file-auto-exts, --cover-art-auto-exts, and
--sub-auto-exts). There's actually one slight complication however. The
input code uses mp_might_be_subtitle_file which guesses if the file drag
and dropped file is a subtitle. The input ctx has no access to mpctx so
we have to be clever here.

For this, the trick is to recognize that we can leverage the
m_option_change_callback. We add a new flag, UPDATE_SUB_EXTS, which
fires when the player starts up. Then in the callback, we can set the
value of sub_exts in external_files to opts->sub_auto_exts. Whenever the
option updates, the callback is fired again and sub_exts updates. That
way mp_might_be_subtitle_file can just operate off of this global
variable instead of trying to mess with the core mpv state directly.

Fixes #12000.
2023-08-26 00:33:00 +00:00
Kacper Michajłow
7d6f9e3739 aspect: change --video-pan-x/y to be relative to the destination rect
It makes it more usable to virtually move dst rect instead of scaled
src.

The issue with the latter is that it is affected by video-zoom
paramters. For example if we do `--video-pan-x=-0.5` in normal case it
will move video -50%, but if we apply video-zoom/scale the video will
float towards the middle in unintuitive way. Extreme case is when one do
--video-zoom-x=0.01, now it is impossible to move video unless you
specify huge video-pan-x value, but it is limited to [-3, 3]. So you
cannot do anything.

With this changes regardless of video scale/zoom, video-pan will keep
center of scaled video in one place.
2023-08-20 23:15:48 +00:00
Niklas Haas
a8192eda6c vo_gpu_next: add --libplacebo-opts
To help test not-yet-exposed options, and for debugging purposes.
2023-08-19 14:12:24 +02:00
Dudemanguy
4a6abff812 x11: add --x11-wid-title option
This deliberately wasn't being done when mpv was embedded
(fbccddb48b). There are some applications
that would benefit from mpv setting a title since they don't do so
themselves (such as tabbed), but at the same time some others would
probably rather not have this behavior (like smplayer). Add an option
that allows an embedded mpv to set the title if the user wishes.
Fixes #11528.
2023-08-13 19:58:20 +00:00