summaryrefslogtreecommitdiffstats
path: root/DOCS
Commit message (Collapse)AuthorAgeFilesLines
* wayland: improve behavior with touch eventsDudemanguy2021-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | There's currently some touch related code in mpv wayland, but clearly nobody actually uses because it's a broken mess. Initially an attempt to distinguish between two finger touches and one finger touch was made, but there's not a good way to make this work. For whatever reason, initiating either xdg_toplevel_resize or xdg_toplevel_move blocks any other touch events from occurring (at least in plasma). Trying to call these functions anywhere else is not really useful since the serial will be invalid outside of the touch down events (well it would work in the touch up event but that's just silly). Anyways, let's just make this work sanely. Eliminate the touch entries variable completely because it's pointless. Only one finger event is ever considered at a time. Touches besides the initial one are all ignored. If a user touches and drags within the touch edge radius, then a resize event occurs. If the user touches and drags elsewhere on the window, a move event occurs. A single tap displays the osc (which is clickable if you tap again). A double tap toggles fullscreen. Additionally, the default touch edge radius of 64 pixels is way too big (at least I think so). Cut this in half to 32 which feels a lot better (on a pinephone using plasma mobile anyway).
* manpage: clarify window-scale behaviorDudemanguy2021-08-071-5/+14
|
* command: make current-window-scale writeable, 2nd attemptDudemanguy2021-08-072-1/+9
| | | | | | | | | | | | | | | | | | | | | | The window-scale property mirrors the respective option (not the effective scale derived from the current window size), and as such setting its value to the same value it had before has no effect. Specifically - the window will not resize. This is consistent as far as property-option bridge behavior goes, but we do end up with an issue that we can't set an arbitrary scale and expect the window to always resize accordingly. We do also have a current-window-scale property which does reflect the actual window size, however, it's been read-only till now. This commit makes current-window-scale RW so that it's now always possible to set an arbitrary scale and expect the window to resize accordingly (without affecting window-scale - like manual resize). Also, mention window-scale no-effect-if-not-changed at the docs. Based on code by @Dudemanguy from commit 873ae0d, with same effect.
* Revert "command: make current-window-scale writeable"Avi Halachmi (:avih)2021-08-072-9/+14
| | | | | | | | | | | This reverts commit 873ae0de2af3bb84a11e5e57f6e3a8942b2263c2. The next commit will restore this functionality, with the following differences from the reverted commit: - Smaller and simpler code change. - On bad scale: use "Invalid value" (compared to "no such property"). - Doesn't combine the docs for window-scale and current-window-scale. - Doesn't remove the docs for window-scale behavior prior to 0.31.0.
* command: make current-window-scale writeableDudemanguy2021-08-052-14/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | Somewhat confusingly, mpv has both a window-scale option and a current-window-scale property. The documentation lists window-scale under properties (and it is technically is one), but at its core it is actually an option which means it behaves subtly different. Options in mpv are runtime-configurable, but they only change anything if the value of the option itself changes. window-scale is an option and not meant to keep track of the actual scale of the window (intended behavior introduced by d07b7f0). This causes window-scale to do nothing in certain cases (ex: the window is manually resized and window-scale is set to 1.00 again). This is logical and consistent with the behavior of the rest of the mpv options, but it also makes it a poor candidate for setting the mpv window scale dynamically. As a remedy, we can just make current-window-scale writeable instead. current-window-scale is intended to always report the actual scale of the window and keep track of any window size changes made by the user. By making this property also writeable, it allows the user to have more intuitive behavior (i.e. setting current-window-scale to 1.00 always sets the window to a scale of 1). Additionally, the default input.conf is changed to use current-window-scale instead of window-scale. The window-scale documentation under property list is removed since it is already documented under options and users should probably set the current-window-scale property instead in most cases.
* sub: sub-filter-regex and jsre: support ass-to-plaintextAvi Halachmi (:avih)2021-08-051-1/+7
| | | | | | | | | | | Using --sub-filter-regex-plain (default:no) The ass-to-plaintext functionality already existed at sd_ass.c, but it's internal and uses a private buffer type, so a trivial utility wrapper was added with standard char*/bstr interface. The plaintext can be multi-line, and the multi-line regexp flag is now always set, but only affects plaintext (the ASS source is one line).
* sub: new: --sub-filter-jsre (js regex)Avi Halachmi (:avih)2021-08-051-0/+5
| | | | | | | | | | | | Pretty much identical to filter-regex but with JS expressions and requires only JS support. Shares the filter-regex-* control options. The target audience is Windows users - where filter-regex doesn't work due to missing APIs, but mujs builds cleanly on Windows, and JS is usually enabled in 3rd party Windows mpv builds. Lua could have been used with similar effort, however, the JS regex syntax is more extensive and also much more similar to POSIX.
* DOCS/input.rst: key names: add shift modifier notehooke0072021-07-301-0/+6
| | | | Fixes #9060
* input: arguments quoting: support single-quotesAvi Halachmi (:avih)2021-07-301-8/+15
| | | | | | | | | | | | | | | | | | | Users expect single quotes to work when the value includes literal backslashes or double-quotes (or as general quoting like in shell). The updated docs also include some previously-missing notes: - newline is only supported in double quotes. - adjacent (quoted) arguments don't join into one. Supporting mixed quoting (adjacent quoted strings) would make mpv's parsing more complete, but would require delicate effort of larger scope, for two reasons: - We'd need to also support escaping outside of quotes and do our best about backward compatibility. - The parsed value can either be a substring of the input or a newly-allocated string, which would be delicate when joining. Not critical to add right now.
* input: argument custom quotes: use ` instead of !Avi Halachmi (:avih)2021-07-301-5/+5
| | | | | | | | | | | Custom quotes were added in 4f129a3e and began with !, however, this required quoting "!reverse" (used for the cycle-values command), which is inconvenient, and was not taken into account when ! was chosen for custom quotes. Also, ` is more natural for quoting than !. This does break backward compatibility with the earlier form of custom quotes, but at least we didn't make a release yet since custom quotes were added (the last release - 0.33[.1] doesn't support it).
* options: audio-display determines cover priorityGuido Cella2021-07-292-9/+13
| | | | | | | | | | | | Let audio-display determine whether embedded images or external cover art tracks should be selected when both are present. Attached pictures are given priority by default as requested in #8539. Also updates references to attached pictures in the log and manpage to refer to cover art as well. Closes #8539.
* DOCS: fix manual compiling warningsgaroto2021-07-282-2/+2
| | | | | | | | | | This fix the warnings shown below when compiling the manual for any of its three common formats: ``` DOCS/man/mpv.rst:46: (ERROR/3) Unknown target name: "--input-test". DOCS/man/stats.rst:183: (ERROR/3) Unknown target name: "--input-test". ```
* DOCS/mpv.rst: fix quotingAvi Halachmi (:avih)2021-07-281-1/+1
| | | | | | In rst, double-backtick starts a code string only if it's followed by a non-space char, otherwise it's taken literally, hence, `` x2.0`` was taken literally rather than code string.
* manpage: explain when properties are expandedGuido Cella2021-07-271-3/+13
|
* manpage: fix watch-later-options examplesGuido Cella2021-07-211-2/+3
| | | | | | | | --watch-later-options-remove doesn't accept multiple options, so split the example. Also suggest the more correct -clr to empty the list, and remove the workaround to not print an error with --watch-later-options=
* options: add watch-later-optionsGuido Cella2021-07-212-0/+24
| | | | | | | | | | This allows configuring which options are saved by quit-watch-later. Fixes #4126, #4641 and #5567. Toggling a video or audio filter twice would treat the option as changed because the backup value is NULL, and the current value of vf/af is a list with one empty item, so obj_settings_list_equal had to be changed.
* stats.lua: remove script-opts for the main keys (i/I)Guido Cella2021-07-211-11/+2
| | | | | | | Unlike the page switching/scrolling keys which are bound at runtime and therefore we need to know which (configured) keys to bind, the main keys (i/I by default) are static and can be bound via input.conf. And indeed, the builtin bindings at etc/input.conf have them already.
* manpage: minor fixesGuido Cella2021-07-212-4/+4
| | | | | | | | - The video filter to turn the video upside-down is vflip. There is no filter called "flip" so using it just causes an error. - Reword a sentence. - Add exact and all to the values accepted by cover-art-auto. They were implemented in 029ff1049b but not added to the accepted arguments.
* DOCS/mpv.rst: add cross references to --input-test and statsAvi Halachmi (:avih)2021-07-191-0/+3
|
* stats.lua: page 4 (keys): support help-like terminal printoutAvi Halachmi (:avih)2021-07-191-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | While --input-test is useful, and so is page 4 of stats, until now there was no way to simply print the list in a help-like fashion. This commit adds such printout, invoked by the script opt stats-bindlist=yes, which uses the existing page 4 code. This prints the list on startup and quits immediately - like any help page. It's awkward to invoke compared to other help pages, and it does require the stats page to be enabled (it is by default), however it is a script-generated output, and currently there's no other method to print a help page generated by a script. The printout itself is performed using lua's io.write. While reliable, it's not the standard way for mpv to print to the terminal. Other possible printout methods are mp.msg.info - which also prints "[stats]" prefix on each line (ugly), or forcing term-osd and setting an osd-message which mpv will then print at the terminal - however that's printed to stderr, and could also be subject to timing concerns since we quit right afterwards. In the future we can consider changing/integrating the invocation so that mpv itself could print a help page generated by a script, thus solving both the awkward invocation and printout-method issues.
* stats.lua: add page 4: active key-bindings listAvi Halachmi (:avih)2021-07-191-0/+17
| | | | | | | | | | | | | This is a scrollable page which also works nicely with the terminal OSD. Typically there are more than 100 bound keys. It groups the binding using fuzzy property/command/script name after simple analysis of the command string, and then further sorts the binding in each group according to the "complexity" of the key itself (plain keys -> keys with modifiers, alphabetically, etc). The alignment/grouping style is heavily inspired by @medhefgo's #8924 but otherwise it's an independent implementation.
* stats.lua: move internal performance from page 4 to page 0Avi Halachmi (:avih)2021-07-191-3/+3
| | | | | This allows adding more pages without the internal performance page getting stuck at the middle of the list.
* DOCS/options: adds documentation for secondary-sub-visibilityRipose2021-07-121-0/+9
| | | | | | The --secondary-sub-visibility options was previously undocumented in the pull request that added it. This commit adds documentation for it and clarifies its behavior.
* command: adds support for secondary subs to sub-seek and sub-stepRipose2021-07-121-2/+16
| | | | | | | Modifies the sub-seek and sub-step commands with a second <flags> argument to specify whether to seek/step on the primary or secondary subtitles. The flag is used to index into the current_track array in cmd_sub_step_seek.
* command: add secondary-sub-start and secondary-sub-end propertiesRipose2021-07-121-0/+6
| | | | | | | Adds secondary-sub-start and secondary-sub-end properties by setting the current_track index in the m_property's priv variable which later gets accessed in get_times. Also adds a test of the secondary subtitle time properties in tests/subtimes.js bound to 'T'.
* manpage: DEL key: clarify it refers to the oscGuido Cella2021-07-121-1/+1
|
* manpage: fix typoGuido Cella2021-07-081-1/+1
|
* player: add append-play flag to loadlistGuido Cella2021-07-061-0/+4
| | | | Closes #5664.
* wayland: handle app id option less stupidlyDudemanguy2021-06-261-2/+1
| | | | | | Not sure what I was on when I wrote this. wayland-app-id is supposed to default to "mpv". Just set that in the vo_sub_opts and don't do this weird m_config_cache_write_opt thing. Also make the doc entry nicer.
* DOCS: fix typo on seekbarkeyframeshooke0072021-06-241-6/+6
|
* sub: by default, don't render timestamps after video EOFrcombs2021-06-231-0/+7
| | | | | | | | | This fixes a long-standing apparent issue where mpv would display the last frame with no subtitles at EOF. This is caused by sub rendering switching from video timestamps to audio timestamps when the video ends, and audio streams often running past the timestamp of the last video frame. However, authoring tools (most notably Aegisub) don't tend to provide easy ways to add meaningful subtitles after the end of the video, so this is rarely actually useful.
* player: change cover-art-auto behaviorGuido Cella2021-06-231-3/+3
| | | | | | | | | | | | | | This makes cover-art-auto behave more like sub-auto and audio-file-auto: - load cover art with a language, e.g. if playing foo.mp3, foo.en.jpg will be loaded with lang=en - load cover art containing the media filename with fuzzy and all, e.g. 'foo (large).jpg' - make all/2 load all images in the directory, and make fuzzy/1 the default These are all uncommon use cases, but synchronizing the behavior of the external file options simplifies the code.
* osc: seekbar hover/drag: display target chapter at the titleAvi Halachmi (:avih)2021-06-221-1/+2
| | | | Fixes #8925
* manpage: add article in fuzzy explanationGuido Cella2021-06-211-2/+2
|
* osc: update chapter marker positions when duration changesSagnac2021-06-161-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Commit 6abb7e3 updates the markers when the chapters change, but it doesn't update their relative position at the bar when the duration changes. This means that adding chapters to a live stream would result in corresponding chapter markers which were static while the duration changed and thus their positions became incorrect over time until the OSC was reinitialized. This is fixed by observing the duration property if chapters are present and reinitializing the OSC when the duration changes. The live_markers user option, which determines whether the duration property is observed when there are chapters, has been added in order to allow disabling this behaviour as calling request_init() frequently might have some impact on low-end systems. The impact of request_init() on render() was measured to increase from 1-1.5 ms to 2-3 ms on a 2010 MacBook Air, while the impact was neglible on a 2016 Surface Book (increasing only to an average of 1.4 ms from 1.3 ms for n=1500 render cycles). The live_markers option is enabled by default.
* js: add mp.utils.append_fileAvi Halachmi (:avih)2021-06-131-2/+8
| | | | | Also, for consistency with other APIs, mp.utils.{write,append}_file now return true on success (and still throw on any error).
* vo_gpu: vulkan: implement a VkDisplayKHR backed contextPhilip Langdale2021-06-111-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | This is the Vulkan equivalent of the drm context for OpenGL, with the big difference that it's implemented purely in terms of Vulkan calls and doesn't actually require drm or kms. The basic idea is to identify a display, mode, and plane on a device, and then create a display backed surface for the swapchain. In theory, past that point, everything is the same, and this is in fact the case on Intel hardware. I can get a video playing on a vt. On nvidia, naturally, things don't work that way. Instead, nvidia only implemented the extension for scenarios where a VR application is stealing a display from a running window system, and not for standalone scenarios. With additional code, I've got this scenario to work but that's a separate incremental change. Other people have tested on AMD, and report roughly the same behaviour as on Intel. Note, that in this change, the VT will not be correctly restored after qutting. The only way to restore the VT is to introduce some drm specific code which I will illustrate in a separate change.
* {ci,docs,README}: update IRC references to new networkJan Ekström2021-06-081-1/+1
|
* docs: fix leftover reference to the now defunct --video-sync-adrop-size optionChris Varenhorst2021-06-041-5/+4
|
* manpage: mention cover-art-autoGuido Cella2021-05-282-5/+6
| | | | | --cover-art-auto affects rescan-external-files, and --autoload-files affects cover art.
* player: load cover art with the media filenameGuido Cella2021-05-271-6/+9
| | | | Closes #8666.
* win32: support the property 'focused'Avi Halachmi (:avih)2021-05-271-2/+1
| | | | | | | | | | | | | And also change the existing WM_KILLFOCUS handler to return 0 instead of 'break' (which later calls DefWindowProcW), as MSDN says we should do for WM_{KILL,SET}FOCUS. It seems that the 'focused' property is now supported by all main VOs: x11, macOS, wayland, Windows. TCT/sixel/caca probably don't support it, and unknown with SDL. Fixes #8868
* vo_gpu: replace --icc-contrast by --icc-force-contrastNiklas Haas2021-05-262-8/+12
| | | | | | | | | | | | | | Not only does this have semantics that make far more sense, it also has a default that makes far more sense. (Equivalent to the old `icc-contrast=inf`) This removes the weird 1000:1 contrast default assumption which especially broke perceptual profiles and also screws things up for OLED/CRT/etc. Should probably close some issues but I honestly can't be bothered to figure out which of the thousands colorimetry-related issues are affected.
* player/command: add secondary-sub-text propertyZsolt Vadasz2021-05-191-0/+3
|
* edl: add a way to add tagsYour Name2021-05-111-0/+20
| | | | | | | | Add new header which shows up as tags/metadata (associated with --display-tags). The way this is added means it doesn't always work, because root->meta (see code) can be NULL for some absurd reason. But it works for the one case I intended to use it (ytdl_hook, see next commit), though only in default configurations.
* command: add display-width/display-height propertyDudemanguy2021-05-061-0/+5
| | | | | | | | | For some reason, this never existed before. Add VOCTRL_GET_DISPLAY_RES and use it to obtain the current display's resolution from each vo/windowing backend if applicable. Users can then access the current display resolution as display-width and display-height as per the client api. Note that macOS/cocoa was not attempted in this commit since the author has no clue how to write swift.
* DOCS/input.rst: clarify --no-input-default-keybindings docsAvi Halachmi (:avih)2021-05-041-1/+4
| | | | | | | | | | | | | | This commit describes more accurately what currently gets disabled by this option - specifically also keys from mp.add_key_binding. It's not necessarily the best behavior because libmpv clients might want to disable mpv's own builtin keybindings while still allowing scripts to define keys which `input.conf' can override. In the future we might exclude mp.add_key_binding from this option, but for now at least document this option accurately. Fixes #8809
* DOCS/lua.rst: fix docs for utils.file_infoAvi Halachmi (:avih)2021-05-031-1/+1
| | | | | | | | | | | | | | The ctime member on Windows uses FILE_BASIC_INFO.ChangeTime, which is pretty much the same as st_ctime on POSIX. See https://devblogs.microsoft.com/oldnewthing/20100709-00/?p=13463 : ... The Last­Write­Time covers writes to the file’s data stream (which you accomplish via the Write­File function). On the other hand, the Change­Time also includes changes to the file metadata, such as changing its file attributes ... Fixes #8801
* command: new property: pid (process id)Avi Halachmi (:avih)2021-05-011-0/+3
| | | | Fixes #7562
* DOCS: clarify how client/script names workDudemanguy2021-04-292-4/+12
| | | | | This isn't really clearly stated anywhere and could understandably lead to some confusion.
* command: osd-dimensions: return ints and doc fixesDudemanguy2021-04-291-2/+2
| | | | | | Some subproperties in osd-dimensions were returned as doubles despite actually being integers. Additionally, correct a highly misleading line in the osd-width/osd-height documentation.
* DOCS: mpv.rst: minor escaping clarificationsAvi Halachmi (:avih)2021-04-231-1/+4
| | | | Fixes #8767
* options: win32: ignore and deprecate --fit-borderAvi Halachmi (:avih)2021-04-231-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The accurate description of this option was: - fit-border is enabled by default. When disabled, it adds a bug where if the window has borders and mpv shrinks it to fit the desktop, then the calculation ignores the borders and adds incorrect video crop. The option was added at commits 70f64f3c and 949247d6, in order to solve an issue (#2935) where if mpv wanted to display a video with size WxH, then w32_common.c incorrectly set the window to WxH, while down-scaling the video slightly to fit (even with small sizes). It was addressed with a new option which is enabled by default, but does the right thing (sets the client area to WxH) only when disabled, so that everyone who prefers their video slightly downscaled could keep their default behavior. (#2935 als