summaryrefslogtreecommitdiffstats
path: root/options/options.h
Commit message (Collapse)AuthorAgeFilesLines
* options: add --input-commands optionDudemanguy8 days1-0/+1
| | | | | | | Basically a simple way to perform any command/property action from the command line. This takes the exact same syntax as input.conf but not including the key naturally. Potentially useful for weird properties that don't map well to options (like ao-volume). Fixes #12353.
* options: remove --focus-on-open and add --focus-onder richter2024-03-101-1/+1
| | | | | | | | | replaces the old focus-on-open option with a more generic focus-on options that can be extended. adjust the only platform that uses that option. Fixes #8337
* options: add --deinterlace-field-parity option1nsane0002024-03-041-0/+1
| | | | | | | | Previously there was no way to specify the field order of interlaced videos when deinterlacing with inbuilt filters. Lavfi deinterlacers seemed to prefer top field order while inbuilt ones (vdpaupp, vavpp, d3d11vpp) seemed to prefer bottom field order. The default "auto" option should work exactly as before while specifying either "tff" or "bff" should force the specified field order
* Revert "player: add ao-volume option, to set the system volume at startup"Dudemanguy2024-03-011-1/+0
| | | | | | | | Ended up being a bad idea. As a property, this inherently has more functionality and the tradeoff of being able to do --ao-volume wasn't worth it. This reverts commit 58ed620c064971535e60778612777750aa5e2f4d.
* player: add ao-volume option, to set the system volume at startupLeonardo Boss2024-02-251-0/+1
| | | | closes #12353
* vo_gpu_next: move gpu-next opts to specific sub optionDudemanguy2024-02-171-0/+1
| | | | | | | This matches the general workflow in the codebase. We keep a cache of these new options and update them if needed. Fixes #13481 and fixes #11518.
* player: add an auto option to deinterlaceDudemanguy2024-02-071-1/+1
| | | | | | | | | | 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.
* sub: add `--sub-lavc-o` optionMohammad AlSaleh2024-01-211-0/+1
| | | | | | | We have `--vd-lavc-o` and `--ad-lavc-o`, but no equivalent option for subtitles. Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
* player: remove --term-remaining-playtime optionDudemanguy2024-01-201-1/+0
| | | | | This wasn't useful and didn't even really do what it said anyway. Closes #12167.
* audio: add --volume-gain options to control volume in decibelsnanahi2024-01-201-0/+3
| | | | | | This adds volume-gain, volume-gain-max, volume-gain-min options, which can be used to control audio volume and target dynamic range in decibels. The gain is applied on top of the existing volume setting.
* player: add forced choice to subs-with-matching-audioDudemanguy2024-01-131-1/+1
| | | | | | | | | | fe875083b3d30b06ef77745f40570e8f63afec2 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.
* options: add --secondary-sub-ass-overridedyphire2023-12-181-1/+1
| | | | Default: strip. preserve the old behavior
* player: refactor secondary subtitle options and propertiesDudemanguy2023-12-161-5/+9
| | | | | | | | | | | | Over the years, we've accumulated several secondary subtitle related options and properties, but the implementation was not really consistent and it wasn't clear what the right process for adding more should be. So to make things nicer, let's refactor all of the subtitle options with secondary variants (sub-delay, sub-pos, and sub-visibility) and split them off to a new, separate struct. All of the underlying values are stored in an array instead for simplicity. Additionally, the implementation of some secondary-sub-* properties were slightly changed so there would be less redundancy.
* options: add --secondary-sub-poskarelrooted2023-12-131-0/+1
| | | | The default value is 0 (on the top of the screen)
* filter_sdh: add --sub-filter-sdh-enclosures optionDudemanguy2023-12-081-0/+1
| | | | | | | | | | | 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.
* options: add --osd-bar-border-sizeGuido Cella2023-11-271-0/+1
| | | | | Closes #1484. The default size is smaller than the previous --osd-border-size default value of 3 with the default --osd-bar-h.
* options: add secondary-sub-delayRipose2023-11-261-1/+1
| | | | | | | | | | | | | 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.
* sub: add --sub-stretch-durations optionMohammad AlSaleh2023-11-071-0/+1
| | | | | | | | | Stretch a subtitle duration so it ends when the next one starts. Should help with subtitles which erroneously have zero durations. I found such a subrip substitles stream in the wild. Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
* javascript: use --js-memory-report option instead of MPV_LEAK_REPORTDudemanguy2023-10-261-0/+1
| | | | | | | | 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.
* options: rename --watch-later-directory to --watch-later-dirDudemanguy2023-10-251-1/+1
| | | | Same logic as the previous commit.
* options: rename --screenshot-directory to --screenshot-dirDudemanguy2023-10-251-1/+1
| | | | | Less characters is better? Other options use -dir for directory so consistency I guess.
* options: rename --sub-ass-force-style to --sub-ass-style-overridesDudemanguy2023-10-251-1/+1
| | | | | | | 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.
* options: rename --override-display-fps to --display-fps-overrideDudemanguy2023-10-251-1/+1
| | | | | | 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.
* win32: add option to change backdrop styleDeadSix2023-09-271-0/+1
|
* cuda: move --cuda-device to cuda_opts groupDudemanguy2023-09-221-0/+6
| | | | Also change a ta_free to talloc_free for consistency reasons.
* opengl/context_win: move opengl-dwmflush to wingl_opts groupDudemanguy2023-09-221-2/+1
| | | | Gets rid of yet another mp_read_option_raw call.
* options: rename some opt structs to *_opts instead of *_paramsDudemanguy2023-09-221-3/+3
| | | | | | Purely cosmetic, but this weird inconsistency bothered me. There's techincally vd_lacv_params and ad_lavc_params too, but encode is special and maybe shouldn't exist so we'll just leave that alone.
* stream_bluray: move --bluray-device to stream_bluray_optsDudemanguy2023-09-221-0/+1
| | | | | | Similar to the previous commit. There's no reason for --bluray-device to be in MPOpts. Make a specific subopt for stream_bluray and use that instead so we can remove the mp_read_option_raw call.
* stream_cdda: move cdrom-device to cdda_paramsDudemanguy2023-09-221-1/+0
| | | | | | 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.
* options: move some demux-specific opts to demux optsDudemanguy2023-09-221-5/+0
| | | | | These options are only ever accessed by the demuxer and have no need to be in MPOpts. Move them to demux.c instead.
* win32: add --window-cornersKacper Michajłow2023-09-211-0/+1
| | | | Allows to set preference for window corners rounding for DWM.
* win32: add an option to control window title bar stateKacper Michajłow2023-09-211-0/+1
| | | | Fixes: #11432
* win32: add an option to change window affinityDeadSix2023-09-211-0/+1
|
* options: remove --vf-defaults and --af-defaultsDudemanguy2023-09-211-2/+2
| | | | | | | 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.
* options: remove deprecated --record-file optionDudemanguy2023-09-211-1/+0
| | | | | | 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.
* options: remove a few options marked with .deprecation_messageDudemanguy2023-09-211-1/+0
| | | | | | | | | | | 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.
* options: remove ancient option fallbacks/deprecationDudemanguy2023-09-211-1/+0
| | | | | | | | | | | | | 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. 26f4f18c0629998a9b91e94722d166866d8b80a3 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.
* Revert "sub: add auto option to --sub-fix-timing"Kacper Michajłow2023-09-111-1/+1
| | | | This reverts commit b47a58516af2c36e66c3987748b5b4a1275ed9e7.
* sub: add auto option to --sub-fix-timingDudemanguy2023-09-071-1/+1
| | | | | | | | | 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.
* vo: add --video-cropKacper Michajłow2023-08-311-0/+2
| | | | | | Just cropping by VO that works with hwdec. Fixes: #12222
* player: rename --sub-forced-only to --sub-forced-events-onlyDudemanguy2023-08-291-1/+1
| | | | | | | | 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.
* player: remove auto choice from sub-forced-onlyDudemanguy2023-08-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First of all, this never worked. Or if it ever did, it was in some select few scenarios. c9474dc9ed6172a5f17f66f4b7d367da6b077909 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 ba7cc071068f4f57ae354e77f64552712fda6855 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. fbe8f9919428a7ed24a61899bfd85bbb7680e389 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.
* player: add always to --subs-fallback-forcedDudemanguy2023-08-281-1/+1
| | | | | | 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.
* player: add --subs-match-os-language optionDudemanguy2023-08-281-0/+1
| | | | | | | 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.
* player: make all autoload extensions configurableDudemanguy2023-08-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | --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.
* x11: add --x11-wid-title optionDudemanguy2023-08-131-0/+1
| | | | | | | | | | This deliberately wasn't being done when mpv was embedded (fbccddb48b4c71c18300b092ef7a3860be2a659a). 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.
* player: add --term-remaining-playtime optionDudemanguy2023-08-131-0/+1
| | | | | | | The OSC reports the speed-adjusted remaining time, but the terminal does not. This is a weird mismatch and the OSC's default behavior makes sense, so let's just do some division and add an option to disable it. Also named "remaining-playtime" after the OSC option. Fixes #10445.
* player: make sub-pos a float valueDudemanguy2023-08-131-1/+1
| | | | | | | | mpv makes this option an integer, but the underlying ass API actually accepts doubles. From some testing, there is no meaningful precision difference between float or double (it seems to go in roughly 0.05 steps), so just make it a float. sd_lavc also can handle non-integer values here. Closes #11583.
* demux_playlist: add option to control recursive directory loadingChristoph Heinrich2023-07-061-0/+1
| | | | | | | | | | | Directories were always loaded recursively, which can be slow (e.g. one of the subdirectories is a mounting point to a slow device) and can unexpectedly expand into a massive playlist. Due to the problems described in 503dada42f1ea1007768da0dc6a41b67cdf89400, this defaults to recursive loading. ref. https://github.com/mpv-player/mpv/issues/9652
* player: add --input-cursor-passthrough optionDudemanguy2023-07-041-0/+1
| | | | | | | | | | | | | Add an option for allowing pointer events to pass through the mpv window. This could be useful in cases where a user wants to display transparent images/video with mpv and interact with applications beneath the window. This commit implements this functionality for x11 and wayland. Note that whether or not this actually works likely depends on your window manager and/or compositor. E.g. sway ignores pointer events but the entire window becomes draggable when you float it (nothing under the mpv window receives events). Weston behaves as expected however so that is a compositor bug. Excuse the couple of completely unrelated style fixes (both were originally done by me).
* sub: rewrite auto-forced-only supportrcombs2023-06-251-1/+0
| | | | | - No longer has a fake "option" used only internally (which didn't always get propagated properly) - Always overrideable during playback
* player: add more precise sub fallback optionsrcombs2023-06-251-0/+2
|
* player: add drag-and-drop optionDudemanguy2023-06-121-0/+1
| | | | | | | | | | | Some platforms (wayland) apparently have a lot of trouble with drag and drop. The default behavior is still the same which is basically obeying what we get from the window manager/compositor, but the --drag-and-drop option allows forcibly overriding the drag and drop behavior. i.e. you can force it to always replace the playlist or append at the end. This only implements this in X11 and Wayland but in theory windows and macos could find this option useful (both hardcode the shift key for appending). Patches welcome.
* player: remove unittest optionDudemanguy2023-03-021-1/+0
| | | | | | | | | Since meson has its own unit testing system, let's rework mpv's tests so they integrate nicely with this. To prepare for this, start off by dropping the unittest option. Of course, this means that tests will no longer be supported in the waf build at all but it will be dropped anyway. Note that the tests option is preserved for the meson build. We will still make use of this in the future commits.
* player: add --auto-window-resize optionDudemanguy2023-03-021-0/+1
| | | | | | | | | | | mpv's window resizing logic always automatically resized the window whenever the video resolution changed (i.e. advancing forward in a playlist). This simply introduces the option to make this behavior configurable. Every windowing backend would need to implement this behavior in their code since a reconfigure event must always be a resize. The params of the frame changed so you either have to resize the window to the new size of the params or make the params the same size as the window. This commit implements it for wayland, win32, and x11.
* options: transition options from OPT_FLAG to OPT_BOOLChristoph Heinrich2023-02-211-91/+91
| | | | | | c78482045444c488bb7948305d583a55d17cd236 introduced a bool option type as a replacement for the flag type, but didn't actually transition and remove the flag type because it would have been too much mundane work.
* drm: rewrite based around vo_drm_stateDudemanguy2023-01-211-3/+1
| | | | | | | | | | |