Commit Graph

488 Commits

Author SHA1 Message Date
der richter d6fdc0ae74 DOCS: make mentions of macOS consistent
change all mentions and variations of OSX, OS X, MacOSX, MacOS X, etc
consistent. use the official naming macOS.
2024-02-21 20:46:53 +01:00
nanahi e19061605f DOCS: document --input-preprocess-wheel option
Document the use cases for enabling or disabling the wheel preprocessing.
Also note that this option has no effect on any filtering already done
by the OS/driver.
2024-02-15 16:44:32 +00:00
Mohammad AlSaleh a1bda5b34d sub: allow setting lavc txt_page special values via teletext_page
* Range of accepted values for teletext_page now include 0 and -1.
 * 0 means "subtitle" and -1 means "*".
 * Make 0 the default.

Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
2024-02-13 10:44:41 +01:00
Dudemanguy 8dbbc2ad82 player: add an auto option to deinterlace
Deinterlacing required that the user set it on/off themselves, but we
actually have handy flags for detecting if a frame is interlaced. So
it's pretty simple to make an auto option using that. Unfortunately,
life is not quite that simple and there are known cases of false
positives from the ffmpeg flags so we can't make auto the default value.
However, it still may have some utility for some people, and the
detection could potentially be improved upon later. Closes #10358.
2024-02-07 14:50:09 +00:00
Dudemanguy 343a5fd345 player: remove all rpi-specific code
vo_rpi and its related code has pretty much historically been a
disaster in mpv. The build regularly gets broken and since nobody uses
it, it takes months for anyone to notice. There was also that time where
fullscreen was broken for about a year and a half. Also building in waf
was entirely broken for about a couple of years or so due to mysterious
reasons no one ever figured out (meson magically fixed it).

Anyways, once again the build is broken due to rpi being forgotten about
again, but instead of pretending to support this crap. Just drop it all.
Nowadays, mmal hwdec is a relic since these devices are better off using
the v4l2m2m ffmpeg fork instead which actually uses KMS properly. RPI 1
and 2 probably can't do this and will remain broken but oh well blame
Broadcom for being special snowflakes and not using standard APIs (my
rockpro worked out of the box; just saying). RPI 2 is nearly 10 years
old anyways, so I think you can afford a new SBC by now. If we were
nicer, there would be a deprecation period, but this is broken in the
last major release anyway so too late.

Closes #13402.
2024-02-05 17:41:06 +00:00
Guido Cella 4ab521f080 command: add load-input-conf
This can be used to auto reload the input configuration file, e.g. in
vim:

autocmd BufWritePost ~/.config/mpv/input.conf silent !echo load-input-conf %:p | socat - /tmp/mpvsocket

Partially fixes #6362.

Additionally this can be used as a replacement for deprecated input
sections if they are ever actually removed. For example, if you want to
define different bindings for images, you can load-input-conf an
input.conf for images, and load the original again when switching to a
video. Though currently you would have to redefine builtin bindings that
were overwritten with image ones in the default input.conf.
2024-02-04 15:12:02 +00:00
Guido Cella e2284fba18 command: add load-config-file
Unlike set include mpv.conf, this works after playback has started. It
can be used to auto reload the configuration, e.g. in vim:
autocmd BufWritePost ~/.config/mpv/mpv.conf silent !echo load-config-file %:p | socat - /tmp/mpvsocket

Partially fixes #6362.
2024-02-04 15:12:02 +00:00
Dudemanguy 45f822593f f_auto_filters: change fallback deinterlace to bwdif
I don't actually deinterlace ever but allegedly this is better than
yadif, and there's no real reason to not have this be the fallback
deinterlace when we're not using hw frames. Also change various mentions
of yadif to bwdif. Ref #12835.
2024-01-21 17:55:54 +00:00
Dudemanguy a39f9b6181 player: remove --term-remaining-playtime option
This wasn't useful and didn't even really do what it said anyway.
Closes #12167.
2024-01-20 23:24:48 +00:00
nanahi a0ba10b62e command: export current-gpu-context property
This exports `current-gpu-context` property, which is the string
description of the current active GPU context. This allows scripts to
uniquely identify the platform and backend used for --vo=gpu
and --vo=gpu-next.
2024-01-20 17:12:07 +00:00
nanahi 27724cab8d DOCS: add documentation for --volume-gain options 2024-01-20 16:08:33 +00:00
Dudemanguy 2ad96079e9 player: add forced choice to subs-with-matching-audio
fe875083b3 confused things a bit and made
--no-subs-with-matching-audio actually mean what it says: no subtitles
if the languages match. However, the option actually meant no non-forced
subtitles not no subtitles at all. This isn't really intuitive so
instead of changing the behavior back to the old way (we already have a
release since then), add a third option "forced" which is equivalent to
the old meaning of --no-subs-with-matching audio. Fixes #13151.
2024-01-13 03:26:06 +00:00
Guido Cella 871f7a152a scripting: add mp.input
This lets scripts get textual input from the user using console.lua.
2024-01-13 02:53:08 +00:00
JohhanSam 68eaaf0da3 DOCS/interface-changes: add --secondary-sub-ass-override
Option added in b563b2ae
2023-12-24 13:09:13 +01:00
Dudemanguy ce958b7742 filter_sdh: add --sub-filter-sdh-enclosures option
This filter is a bit complicated, but one of the essential parts of it
is removing text enclosed by particular set of characters (e.g. text
inbetween []). This was previously hardcoded to only take into account
parenthesis and brackets, but people may want to filter more things so
make this customizable. The option only takes "left hand characters" so
the right pair is mapped internally if applicable. If not, then we just
use the same character. Fixes #8268 since the unicode character in
question can just be passed to this option.
2023-12-08 18:14:06 +00:00
nanahi 21bd301372 DOCS/interface-changes: document renaming of MP_KEY_BACK
The navigation key is renamed to avoid conflict with MP_KEY_FORWARD.
2023-12-06 11:07:37 +01:00
Kacper Michajłow 06e627048f image_writer: default to lossless AVIF screenshots
Also change the example to crf=23. crf=32 is pretty bad quality, don't
give users bad usage ideas.
2023-12-04 20:34:17 +01:00
Kacper Michajłow 4949cab734 image_writer: use common format selection for AVIF screenshots
--screenshot-avif-pixfmt no longer defaults to yuv420p.
2023-12-04 20:34:17 +01:00
Guido Cella 0c4812aa72 options: add --osd-bar-border-size
Closes #1484. The default size is smaller than the previous
--osd-border-size default value of 3 with the default --osd-bar-h.
2023-11-27 15:02:28 +00:00
Ripose dea512ea38 options: add secondary-sub-delay
Add --secondary-sub-delay option and decouple --sub-delay from secondary
subtitles. This produces desirable behavior in most cases as secondary
and primary subtitles tracks tend to be timed independently of one
another.

This feature is implemented by turning the sub_delay field in
mp_subtitle_opts into an array of 2 floats. From here the track index is
either passed around or derived when sub_delay is needed. There are some
cases in dec_sub.c where it is possible for dec_sub.order (equivalent to
track index) to be -1. In these cases, sub_delay is inferred as 0.
2023-11-26 23:22:05 +01:00
Dudemanguy 86b498ecc0 player: remove shared-script-properties property
This property was never encouraged. The manual even stated that "You
should avoid using it, unless you absolutely have to." Since we now have
user-data which is superior in every single way and replaces this,
delete this property. The manual also has threatened people for years
with the line "It's a makeshift solution which could go away any time
(for example, when a better solution becomes available)." We were nice
and deprecated it in 1d00aee8e1 for a
while to give script authors some time to update. Let's remove it for
good now.
2023-11-22 16:29:43 +00:00
sfan5 818ce7c51a
Release 0.37.0 2023-11-21 19:47:46 +01:00
Kacper Michajłow e669493e6e options: add more properties to default watch-later-options
Adds:
--secondary-sub-visibility
--video-aspect-method
--video-unscaled
--video-pan-x
--video-pan-y
--video-rotate
--video-crop
--video-zoom
--video-scale-x
--video-scale-y
--video-align-x
--video-align-y

Those properties are related to playback state and are likely expected
to be restored when resuming playback.
2023-11-12 21:25:22 +00:00
Kacper Michajłow cb30c497c2 options: remove not relevant props from default watch-later-options
Removes:
--border
--fullscreen
--ontop
--osd-level
--pause

Those options are not really content related. I don't see much gain to
save them per each watch later entry.
2023-11-12 21:25:22 +00:00
der richter fc4db187d0 cocoa: remove OpenGL cocoa backend
the OpenGL cocoa backend was deprecated in 0.29, it has lot of bugs, is
completely unmaintained and can't properly playback anything anymore on
the newest macOS. it is time to remove it.
2023-11-10 14:54:37 +01:00
der richter a54cc02341 mac: change display name retrieval to localizedName NSScreen property
the old displayName property via the IODisplay API is not working
anymore on ARM based macs and was broken in at least one other case.

instead we use the new localizedName property introduced in 10.15 of the
NSScreen. we don't need any backwards compatibility since 10.15 is the
oldest version we support now.

configs and scripts that use the options and properties fs-screen-name,
screen-name or display-names need to be adjusted since the names could
differ from the previous implementation via the IODisplay API.

Fixes #9697
2023-11-10 14:30:32 +01:00
Niklas Haas 293fe9d74a vo_gpu_next: add --target-gamut option
Fixes: https://github.com/mpv-player/mpv/issues/12777
2023-11-08 00:55:39 +01:00
Kacper Michajłow 38da5b89c2 player/command: remove hdr-metadata property
It is now included in video-out-params and was never released in stable
version, so we can safely remove it.
2023-11-05 18:57:36 +01:00
Kacper Michajłow 1174afcccc csputils: add pl_hdr_metadata to mp_colorspace and deprecate sig_peak
Note this commit does not change all uses of sig-peak, this is for
future refactoring.
2023-11-05 18:57:36 +01:00
NRK 3789f1a387 demux: make hysteresis-secs respect cache-secs
currently hysteresis-secs only works when the demuxer-max-bytes fills
up. but it's possible for the cache-secs/demuxer-readahead-secs to be
reached first.

in those cases, hysteresis-secs doesn't work and keeps buffering
non-stop. but the goal of this option was to save power by avoiding
non-stop buffering so go ahead and make it respect cache-secs as well.

additionally remove some redundant repetition from the docs.
2023-10-30 17:16:38 +00:00
Dudemanguy b56e63e2a9 m_option: drop support for -del for list options
5f74ed5828 deprecated this many years ago.
The utility is questionable at best given that -remove exists and is
more natural to use. Free up some code and drop it.
2023-10-30 16:47:44 +00:00
Dudemanguy 991e2a599c options: make --screenshot-directory/--watch-later-directory aliases
By popular demand I guess.
2023-10-30 16:46:32 +00:00
Dudemanguy b9c42755a7 javascript: use --js-memory-report option instead of MPV_LEAK_REPORT
The MPV_LEAK_REPORT environment variable was previously read in order to
determine whether or not to enable memory reporting for javascript
scripts. This is kind of weird and deviates from the norm of exposing an
option to the user. So let's just add --js-memory-report and disable it
by default instead.
2023-10-26 16:49:56 +00:00
Dudemanguy 2783d5a51a options: rename --play-dir to --play-direction
--play-dir sounds like it has something to do with directories so change
it. The play_dir variable is used a bunch everywhere internally so
whatever just leave it alone instead of renaming that.
2023-10-25 16:16:37 +00:00
Dudemanguy 36de0d784f options: rename --watch-later-directory to --watch-later-dir
Same logic as the previous commit.
2023-10-25 16:16:37 +00:00
Dudemanguy 1370ecfc1b options: rename --screenshot-directory to --screenshot-dir
Less characters is better? Other options use -dir for directory so
consistency I guess.
2023-10-25 16:16:37 +00:00
Dudemanguy b626f3ba83 options: rename --sub-ass-force-style to --sub-ass-style-overrides
This option has exactly the same semantics are other mpv options that
override a particular thing with something from the user. So instead of
the "force-style" name, use "-overrides" which is more consistent.
The plural form is used since it's a list option.
2023-10-25 16:16:37 +00:00
Dudemanguy 9924102c66 options: rename --override-display-fps to --display-fps-override
Other similar options are in the form of --foo-override not
--override-foo. The display-fps one was backwards so flip it around the
other way for consistency reasons.
2023-10-25 16:16:37 +00:00
Dudemanguy 7aed492ccc options: rename --fps to --container-fps-override
This better reflects what it actually does. As a bonus, script writers
won't be misled into thinking that fps displays the actual video or
display fps.
2023-10-25 16:16:37 +00:00
Kacper Michajłow 869faadc68 options: disable --allow-delayed-peak-detect by default
Peak detection greatly increases HDR experience. Performance hit of
non-delayed detection is not that significant and is in line with
current default settings.
2023-10-25 11:55:56 +02:00
Dudemanguy 39247bd0b6 stream_cdda: deprecate --cdda-toc-bias and always check for offsets
I started going through the blame but once I got to mplayer commits from
20 years ago, I stopped bothering. This obscure option has always been
disabled by default, but there's zero reason, as far as I know, to not
just enable it today. Some CDs (particularly very old ones) have the
first sector shifted a bit and not starting exactly at 0. This makes the
logic that tries to get all the chapters completely fail and thus you
can't skip through tracks. However if you just enable this obscure
option, it just works. For anything that starts exactly at 0, the
calculated offset is just 0 anyway so it's a no-op and works exactly the
same. So basically, there's literally no reason to not just always try
to correct for the offset of the first sector by default.

Fixes #8777.
2023-10-19 12:10:53 -05:00
Guido Cella 16d9d3b273 DOCS/interface-changes: remove redundant change
directory-mode's default was changed again to auto afterwards.
2023-10-17 11:03:25 +02:00
Kacper Michajłow 72536cce62 f_decoder_wrapper: change video-codec to show description or name
Not both of them. Formating it as `<name> (<desc>)` produced arguably
silly string like `hevc (HEVC (High Efficiency Video Coding))`. Unpack
this to show only description if available or name otherwise. Produces
way nicer results in stats.lua and similar places where this name is
printed.
2023-10-14 12:30:46 +02:00
Guido Cella 81dea9031d command: add playlist-next-playlist and playlist-prev-playlist
playlist-prev-playlist goes to the beginning of the previous playlist
because this seems more useful and symmetrical to
playlist-next-playlist. It does not go to the beginning when the current
playlist-path starts with the previous playlist-path, e.g. with mpv
--loop-playlist foo/, which expands to foo/{1..9}.zip, the current
playlist path foo/1.zip beings with the playlist-path foo/ of {2..9}.zip
and thus playlist-prev-playlist goes to 9.zip rather than to 2.zip.

Closes #12495.
2023-10-09 15:09:35 +00:00
Dudemanguy da4f11803f demux: change the default of metadata-codepage to auto
There's really no reason not to do this especially since sub-codepage
already defaults to auto. Also change logging in charset_conv since
telling us that the data is UTF-8 if the passed codepage value is "auto"
or "utf-8" is really not useful information (that's the expectation).
2023-10-07 02:41:27 +00:00
Dudemanguy 50b23a8c44 demux_cue: deprecate --demuxer-cue-codepage for --metadata-codepage
What are cue sheets not metadata or something? No reason this needs to
be a separate option so just deprecate it. This does mean that the
default value changes from "auto" to "utf-8" for this obscure fringe
case. I really hope people don't use non-UTF-8 cuesheets, but the next
commit will change the default of --metadata-codepage to "auto" so
there's no actual change in behavior to users.
2023-10-07 02:41:27 +00:00
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