summaryrefslogtreecommitdiffstats
path: root/DOCS
Commit message (Collapse)AuthorAgeFilesLines
* manpage: document off-by-one loop-file behaviorLeo Izen2021-01-071-0/+5
| | | | | loop-file counts the number of zero-seeks, not playthroughs, which makes its counter off by one compared to loop-playlist.
* manpage: rename OS X references to macOSLeo Izen2021-01-034-36/+36
| | | | | | | | Apple has decided that Mac OS X is now named macOS for the time being. For consistency, it makes sense to use the same name for the operating system in all places where it occurs. This commit renames OS X to macOS in the documentation in places where it was otherwise still using the old name.
* input.conf syntax: support custom quotes !XstringX!Avi Halachmi (:avih)2020-12-311-8/+18
| | | | | | | | | | Where X is any ASCII char chosen by the user. An argument is only interpreted as custom-quoted if it starts with '!' and the line doesn't end right after it. Custom quotes don't interpret backslash-escape. This change only affects command arguments which mpv parses (not array commands), and not tokens before the arguments (where applicable - key name, input section, command prefixes, command name).
* input.rst: fix typo commands -> argumentsAvi Halachmi (:avih)2020-12-311-1/+1
|
* vd_lavc: add VP8 to the default allowed hwdec codec listEmmanuel Gil Peyrot2020-12-301-1/+1
| | | | | It is supported at least on Intel, from gen8 to gen11, and still gives a pretty welcome reduction of CPU usage on my gen9.
* mac: use visible frame rectangle for window geometry calculationder richter2020-12-192-1/+16
| | | | | | | | | | | | | currently we use the whole screen rectangle to calculate the window geometry. this doesn't take the menu bar or the Dock into account. by default use the visible screen rectangle instead. this is also a change in behaviour, since the window can't be placed outside of this rectangle anymore. also add an option to change to the old behaviour, because it can still be useful in certain cases, like placing the window directly underneath the menu bar when used a desktop background. Fixes #8272
* console: use wl-paste on WaylandGuido Cella2020-12-141-2/+2
|
* manpage: document background transparencyGuido Cella2020-12-081-7/+7
| | | | | | | | | | | | | | | --alpha=yes doesn't affect only transparent videos and images, but also the background. I spent time researching how to implement transparent backgrounds and had no idea that they already worked at least on Wayland. Background transparency will work on X11 when https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2376 is merged. It doesn't work on Windows. No idea about macOS. Either way, this paragraph already says that it only works on certain environments twice. References #6590
* manpage: clarify that you can prefetch m3u8 urlsGuido Cella2020-12-081-5/+7
| | | | | | | | | | | With the current wording, I thought that playlist-prefetch doesn't prefetch the next url within a playlist of m3u8 urls, but it makes a big difference, and I would have enabled it earlier if it wasn't for this paragraph. This makes it clear that you can prefetch any file, but that it won't prefill the cache with the video data. This is true for any video, there's nothing unique about HLS streams in the behavior of this option.
* player: add --screen-name and --fs-screen-nameDudemanguy2020-12-062-0/+15
| | | | | | Simple groundwork for adding a couple of user options that allow selecting the screen with a string name. The next two commits implements these options for xorg and wayland.
* manpage: clarify profile-cond requires underscoresGuido Cella2020-12-061-3/+5
| | | | | | | While this says that _ is replaced with -, it doesn't say that you HAVE to use _. This isn't obvious and I didn't understand why my profile conditions with - weren't working at first. Seeing as the person who reproted #8324 ran into this as well, this may be worth clarifying.
* vo_sixel: change default dither to "auto"Avi Halachmi (:avih)2020-11-271-3/+3
| | | | | | | | | | | | | | For two reasons: 1. It was counter intuitive that there's an "auto" value (which is actually a libsixel value and not an mpv one), but it's not the default value - our default was Atkinson. 2. "auto" provides better dithering than Atkinson with libsixel, which is especially noticeable with smooth gradients - where Atkinson has visible banding. In libsixel 1.8.2 the "auto" value maps to Atkinson if the output palette has up to 16 colors, or to Floyd-Steinberg otherwise (e.g. using fixed palette with 256 colors chooses Floyd-Steinberg).
* vo_sixel: fix the image corruption with mltermAvi Halachmi (:avih)2020-11-271-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | The issue was that we only uploaded the palette to the terminal when it changed (once on init with fixed palette, every frame with dynamic palette with trheshold=-1, only on scene change with threshold >= 0). Now we upload it on every frame, and it seems to fix the mlterm image corruption both with fixed palette and also with dynamic palette with threshold (i.e. at frames which did not upload a palette). It's not entirely clear why it's required with mlterm. It would seem that the palette which libsixel uses with fixed palette matches the built in default palette in xterm, but not in mlterm. With dynamic palette we can guess that mlterm resets the palette after a sixel image, but that's not confirmed. Uploading the palette on every frame doesn't seem to slow down xterm when using fixed palette - not clear yet why uploading a different palette (when using fixedpalette=no) slows it down while same palette on every frame doesn't. In mlterm there's no slowdown either way - and now also no corruption.
* vo_sixel: support --vo-sixel-exit-clear[=yes]Avi Halachmi (:avih)2020-11-271-0/+4
| | | | | | | | By default we still clear the screen, but now it's possible to leave the last sixel image on screen. Allows mpv to be used as img2sixel of sorts, but with our auto-fit and various mpv scaling/filters etc.
* Revert "options: disable vsfilter blur compat by default"rcombs2020-11-221-1/+1
| | | | | | | | | | | | | | | This reverts commit 3d17e19c2c5ca80f916411e7e61126cac8443baa. The effect of turning off this setting is that mpv doesn't tell libass what the video stream's resolution is. This happens to result in some files having their transforms scaled in ways that give higher performance (as described in #7435) because libass happened to guess a video resolution that resulted in transforms yielding smaller bitmaps, but it's just as easy for the opposite to happen depending on the resolutions and effects involved. The option's name is also somewhat misleading: setting the storage size affects blur, but it also affects stroke (which is far more important for the vast majority of scripts) and 3D transforms (which look very screwy when done wrong).
* vo_sixel: Add aspect ratio based output centeringShreesh Adiga2020-11-221-35/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | Resize the image based on the dimensions reported by vo_get_src_dst_rects to correctly handle aspect ratio that might be set/ignored. Added pad-x and pad-y options for padding. These options will be used to remove the extra padding. Some terminals report the padding of 2px in the ioctl dimensions which can't be used for displaying sixel output. These options can be used for fine tuning the output video resolution. Now all the terminal size detection and calculation logic is done in a single function at resize. Also top and left values are computed from the dst_rect parameters to simplify the logic for the aspect ratio based centering. Additionally vo-sixel-rows and vo-sixel-cols options have been added to enable the user to override the values in case of failures with get_terminal_size2. This commit also adds ability to handle video zoom correctly. Whenever video-zoom is triggered, the src and dst rects will be updated. Scaling seems to work well now.
* doc: split BNF definitions of <command> and <argument> in separate linesEmanuele Torre2020-11-221-2/+3
| | | | | | Having them in the same line made it hard to read them in the man page since they are formatted in the same way and they look as though they are only one definition.
* manpage: document improved --playlist securityLeo Izen2020-11-181-18/+28
| | | | | | | Recent versions of mpv have applied security checks to --playlist that previously only existed if playlist files were played as an input directly. This commit documents this change and how to work around it, in the event that playlist files are trusted.
* docs/input.rst: document the mouse-pos propertyAvi Halachmi (:avih)2020-11-161-0/+14
|
* path: do not use old_home for win32 exe dirwm42020-11-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | Apparently mpv supports loading config files from the same directory as the mpv.exe. This is a fallback of some sort. It used the old_home mechanism. I want to add a warning if old_home exists, but that would always show the warning on win32. Obviously we don't want that. Add a separate exe_dir entry to deal with that. Untested, but probably works. Mistakenly reverted as part of the default configuration directory location switch-back in aa18a8e1cde663caeabd93af7d57a745c1a76af6. Separation of the mpv executable directory from old_path is a good change now that we warn about the old_config directory also existing. Fixes #8232 Fixes #8244 Fixes #8262
* js: report scripts CPU/memory usage statisticsAvi Halachmi (:avih)2020-11-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can be viewed at page 4 of the internal stats display (i or I). CPU time report is the same as at lua.c, but untested - doesn't seem to work on windows - also not for lua. TL;DR: Set env MPV_LEAK_REPORT=1 to enable js memory reporting stats. This also almost doubles the memory usage by js scripts. For memory reporting, we don't have enough info by default, because even when using a custom allocator, mujs doesn't report the old size (on free or realloc) because it doesn't track this value, and as a result we can't track the overall size. Our option are either to track the size of each allocation on our own, or use talloc which tracks this value. However, using talloc for mujs allocations adds a considerable overhead, and almost doubles(!) the overall memory used, because each individual allocation includes a considerable talloc header, and mujs does many small allocations. So our solution is that by default we behave like previously - not using a custom allocator with mujs, and stats does not display memory usage for js scripts. However, if the env var MPV_LEAK_REPORT is set to 1, then we use a custom allocator with talloc and track/report memory usage. We can't switch allocator at runtime, so an mpv instance either tracks or doesn't track js scripts memory usage, according to the env var. (we could use a property and apply it whenever a new script starts, so that it could change for newly launched scripts, but we don't).
* manpage: properties fixesGuido Cella2020-11-111-17/+21
| | | | | | | | | | | - Explain which properties are writeable. - Mark edition-list/N/id as writable. - Remove (R) from some read-only properties since none of the others have it. - Add osd-dimension/ to its subproperties. - options/<name> isn't read-only. - focused works on macOS because of 82eda2e. Though it shouldn't be possible to observe it without raising VO_EVENT_FOCUS.
* manpage: document the property-change eventGuido Cella2020-11-111-0/+11
|
* manpage: document video-frame-info sub-propertiesGuido Cella2020-11-111-5/+13
| | | | | | | The picture type is explained in /usr/include/libavutil/avutil.h Other subproperties in /usr/include/libavutil/frame.h And there is a more detailed explanation for repeat_pict in /usr/include/libavcodec/avcodec.h
* manpage: remove redundant "Return(s) "Guido Cella2020-11-111-59/+58
| | | | | | ...from the property descriptions that include it, and reformat the paragraphs. And say "Returns" in idle-active.
* manpage: document demuxer-cache-state betterGuido Cella2020-11-111-4/+11
|
* manpage: be consistent with booleansGuido Cella2020-11-111-73/+73
| | | | | | | | | | | | | When possible, refer to booleans with "Whether..." since it can refer to both yes (using input.conf and mp.get_property) and true (using the JSON IPC or mp.get_property_native/bool), else explicitly say yes/true. Say "true" for subprocess and osd-overlay named arguments since you can't use them in input.conf and you will typically use them with the boolean true in the named arguments, like the subprocess example in the manpage does (though the string "yes" also works). Subproperties that can't be accessed with the / syntax like demuxer-cache-state's bof-cached and eof-cached always return true, never yes.
* DOCS: correct interface-changes.rstDudemanguy2020-11-071-2/+2
| | | | delete-watch-later-config was introduced in mpv 0.33.0 not mpv 0.31.0.
* video/out/vo_sixel.c: Implement sixel as a output deviceShreesh Adiga2020-11-071-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | Based on the implementation of ffmpeg's sixel backend output written by Hayaki Saito https://github.com/saitoha/FFmpeg-SIXEL/blob/sixel/libavdevice/sixel.c Sixel is a protocol to display graphics in a terminal. This commit adds support to play videos on a sixel enabled terminal using libsixel. With --vo=sixel, the output will be in sixel format. The input frame will be scaled to the user specified resolution (--vo-sixel-width and --vo-sixel-height) using swscaler and then encoded using libsixel and output to the terminal. This method requires high cpu and there are high frame drops for 720p and higher resolution videos and might require using lesser colors and have drop in quality. Docs have all the supported options listed to fine tune the output quality. TODO: A few parameters of libsixel such as the sixel_encode_policy and the SIXEL_XTERM16 variables are hardcoded, might want to expose them as command line options. Also the initialization resolution is not automatic and if the user doesn't specify the dimensions, it picks 320x240 as the default resolution which is not optimal. So need to automatically pick the best fit resolution for the current open terminal window size.
* manpage: document av1 addition to --hwdec-codecs default settingLeo Izen2020-11-051-1/+1
| | | | | Document the change to add AV1 to the list of default hwdec codecs, in commit 172146e9f7a231b5de21921d883612d18b13a717.
* input.conf: add default keybindings for sub-scalesoredake2020-10-271-0/+3
|
* console: let type set the cursor positionGuido Cella2020-10-271-2/+8
| | | | | | | | | | | | | | | | | | This allows keybindings such as: a script-message-to console type "seek :0 absolute" 6 % script-message-to console type "seek absolute-percent" 6 The cursor position 0 isn't allowed because it has the weird effect of filling the console with the text twice, leaving the cursor in the middle. Negative positions would put the cursor n characters before the end, and positions greater than the text's length at the end. They seem to work at first, but the console breaks when you move the cursor, so they aren't allowed. It seems that float values don't cause issues, but I'm using the argument's floor anyway to be safe. Using >= 1 instead of > 0 ignores values like 0.5.
* ytdl_hook: support alternative youtube-dl pathRicardo Constantino2020-10-271-0/+5
| | | | | Allows using a youtube-dl not in PATH or a compatible fork of youtube-dl.
* command: add delete-watch-later-configVladimir Panteleev2020-10-222-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces the delete-watch-later-config command, to complement write-watch-later-config. This is an alternative to #8141. The general problem that this change is attempting to help solve has been described in #336, #3169 and #6574. Though persistent playback position of a single file is generally a solved problem, this is not the case for playlists, as described in #8138. The motivation is facilitating intermittent playback of very large playlists, consisting of hundreds of entries each many hours long. Though the current "watch later" mechanism works well - provided that the files each occur only once in that playlist, and are played only via that playlist - the biggest issue is that the position is lost completely should mpv exit uncleanly (e.g. due to a power failure). Existing workarounds (in the form of Lua scripts which call write-watch-later-config periodically) fail in the playlist case, due to the mechanism used by mpv to determine where within a playlist to resume playback from. The missing puzzle piece needed to allow scripts to implement a complete solution to this problem is simply a way to clean up the watch-later configuration that the script asked mpv to write using write-watch-later-config. With that in place, scripts can then register an end-file event listener, check the stop playback reason, and in the "eof" and "stop" case, invoke delete-watch-later-config to delete any saved positions written by write-watch-later-config. The script can then proceed to immediately write a new one when the next file is loaded, which altogether allows mpv to resume from the correct playlist and file position upon next startup. Because events are delivered and executed asynchronously, delete-watch-later-config takes an optional filename argument, to allow scripts to clear watch-later configuration for files after mpv had already moved on from playing them and proceeded to another file. A Lua script which makes use of this change can be found here: https://gist.github.com/CyberShadow/2f71a97fb85ed42146f6d9f522bc34ef (A modification of the one written by @Hakkin, in that this one takes advantage of the new command, and also saves the state immediately when a new file is loaded.)
* command: expose underlying pixfmt for hwdecsfan52020-10-161-0/+5
|
* manpage: Document behaviour of *nix configuration directoriesPhilip Langdale2020-10-161-6/+22
| | | | | | | The original documentation here is unclear, so let's describe the behaviour we actually have. Inspired by wm4's updated docs but obviously not identical because we're not changing any of the behaviours.
* Revert "path: switch back to using non-XDG config dir by default"Philip Langdale2020-10-161-41/+23
| | | | This reverts commit 269f0e743e5634691f0c9d5b1b8a4bb68eedbbd0.
* Revert "path: do not use old_home for win32 exe dir"Philip Langdale2020-10-161-2/+0
| | | | This reverts commit c3694f0acb7f71daac7606fafbadcb7b500ca35e.
* Revert "manpage: reference standard for configuration file location"Philip Langdale2020-10-161-5/+0
| | | | This reverts commit 67b4a96e4592a6bf95a86ebcc8f6c5e951fe327d.
* docs: fix simple typo, unminimze -> unminimizeTim Gates2020-10-141-1/+1
| | | | | | There is a small typo in DOCS/man/options.rst. Closes #8165
* DOCS: fix typo on sub-filter-regex-enableChris Varenhorst2020-10-121-1/+1
|
* manpage: reference standard for configuration file locationwm42020-10-091-0/+5
|
* Revert "wayland: add wayland-display-socket option"Dudemanguy2020-10-071-6/+0
| | | | | | | Pointless feature that can be done with environment variables. It was also implemented incorrectly and broke autoprobing. This reverts commit 015b6768759c8bd8cc815be01123ef95c192f3c5.
* wayland: add wayland-display-socket optionDudemanguy2020-10-061-0/+6
| | | | | | | | | | As per the client API, a client can connect to any arbitrary wayland socket. mpv has always just passed NULL which connected to the compositor currently in use, but one could just as easily pass the name of a different socket (i.e. the value of WAYLAND_DISPLAY). Here, we just expose this argument as a user configurable option. If the user passes a socket name that does not exist, then print a warning and fall back to NULL.
* screenshot: add --screenshot-sw optionwm42020-10-051-0/+15
| | | | | Probably worthless. As usual, the manpage dumps all the subtle differences due to implementation details on the user.
* player: add automatic loading of external cover art fileswm42020-09-281-1/+33
| | | | | | | | | | | | | | | | | | | | | | | Picks up files like "cover.jpg". It's made part of normal external file loading, so I'm adding 3 new options that are direct equivalents for the options that control loading of external subtitle and audio files. Even though I bet nobody wants them and they just increase confusion... I guess the world is actually hell, so this outcome should be fine. It prefers non-specific external files like "cover.jpg" over embedded cover art. Not sure if that's wanted or unwanted. There's some pain over explicitly marking such files as external pictures. This is basically an optimization: in most cases, a heuristic would treat an image file loaded with --external-file the same (it's a heuristic because ffmpeg can't tell us whether something is an image or a video). However, even with this heuristic, it would decode the cover art picture again on each seek, which would essentially slow down seeking in audio files. This bothered me greatly, which is why I'm adding these additional options at all, and bothered with the previous commit. Fixes: #3056
* mac: add an option to prevent focusing of the window on opender richter2020-09-251-0/+5
| | | | | | | | | on macOS 10.15 setting the activation policy behaves quite weirdly. the call changes the current active App to a nameless process, which probably also the reason that prevents the not focusing to work. a workaround for that, is to refocus the previous active app. Fixes #7725
* mac: add an option to change the App activation policyder richter2020-09-201-0/+7
| | | | useful to hide the app icon in the Dock if necessary.
* mac: add ontop window level for desktopder richter2020-09-201-1/+2
| | | | | | this puts the window ontop of the desktop but behind the desktop icons. Fixes #7791
* manpage: fix console keybindings punctuationGuido Cella2020-09-181-3/+3
|
* msg: make --msg-time show time in secondswm42020-09-181-1/+1
| | | | | More readable, similar to what --log-file will use (although the terminal code shows microseconds and uses less left padding).
* manpage: refer to --sub-color for colorsGuido Cella2020-09-171-4/+4
| | | | | Don't make the user search for --osd-color only to make him search again for --sub-color.
* manpage: mark file-local-options as writableGuido Cella2020-09-171-1/+1
|
* stream_slice: interpret `end` as offset if it starts with '+'Mohammad AlSaleh2020-09-171-0/+7
| | | | | | | | Example: slice://1g-2g@file.ts (1 to 2) slice://1g-+2g@file.ts (1 to 3) Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
* command: add property track-list/N/main-selectionwnoun2020-09-121-0/+7
|
* manpage: "fix" some formattingwm42020-09-101-4/