Commit Graph

11522 Commits

Author SHA1 Message Date
Sagnac aab9ab97f0 DOCS/options: fix incorrect labelling of hr-seek default
The `absolute` value was incorrectly labelled as the default instead of
the value named `default`, which was somewhat confusing. When the newer
default option was added in 679e410 it seems like wm4 forgot to remove
the label in the manual on the previous default.
2022-06-10 13:42:10 +00:00
Dudemanguy ec236f7a99 osc.lua: add idlescreen and osc-idlescreen
This is mainly for other user scripts that may conflict with the osc
logo in some way. Although it is possible to listen for
shared-script-properties, this has many edge cases that could easily pop
up. A user could want other OSC things to happen at the same time (say
osc-message). They just don't want the logo. The idlescreen option
disables all idlescreen related things (including the santa hat) if it
is set to "no". A new script message (osc-idlescreen) is also added so
users can easily toggle the value (passing "cycle" or just explictly
setting "yes" or "no"). Some more discussion on this is found in the
below github issues.
https://github.com/mpv-player/mpv/issues/10201
https://github.com/CogentRedTester/mpv-file-browser/issues/55
2022-06-04 14:48:32 +00:00
Dudemanguy 1ff2153245 DOCS/interface-changes: mention vaapi-wayland vo 2022-05-30 19:51:46 +00:00
Aaron Boxer defb02daa4 vo: add new vaapi-wayland driver
This driver makes use of dmabuffer and viewporter interfaces
to enable efficient display of vaapi surfaces, avoiding
any unnecessary colour space conversion, and avoiding scaling
or colour conversion using GPU shader resources.
2022-05-24 21:39:34 +00:00
Guido Cella fe9e074752 various: remove trailing whitespace 2022-05-14 14:51:34 +00:00
Emanuele Torre 90d291dce7 DOCS/input: fix typo "NANME" -> "NAME" 2022-05-02 13:24:07 +00:00
Jakub Wilk 05f0ff304e DOCS/ao: remove only usage of git.io link shortening service
This link was originally shortened in bf0cb27489
to improve manpage formatting, but unfortunately Github is now
taking down this service on the 29th. Thus, the full link is
being reinstated.

ref: https://github.blog/changelog/2022-04-25-git-io-deprecation/
2022-04-28 01:07:11 +03:00
Leo Izen 6605b6d619 DOCS/options: properly capitalize JPEG XL
The appropriate style for jxl images is JPEG XL,
not Jpeg XL. Update the docs to reflect this.
2022-04-26 12:47:07 -04:00
Leo Izen 1345977f99 video/image_writer: add Jpeg XL screenshots
Add Jpeg XL as a possible output format for screenshots, which
should make it possible to take fast screenshots with much better
quality than JPEG, or take lossless high-bit-depth screenshots
with lower file sizes than PNG.
2022-04-26 16:48:00 +03:00
Cœur bb5b4b1ba6 various: fix typos 2022-04-25 09:07:18 -04:00
Guido Cella f75701b219 DOCS/options: update the --load-osd-console documentation
- Say built-in which is more common than builtin
- Move "By default" because only the key to open the console is
  customizable, and fix the punctuation and case of the sentence
- ` opens the console, not ´
- Remove the sentences that explains which user script console.lua is
  based on since it's no longer relevant now that the console has been
  part of mpv for over 2 years.
2022-04-21 17:07:47 +00:00
Guido Cella c8125119fa DOCS/input: update the ASS tags documentation URL
The current one hasn't worked in years.
2022-04-21 16:53:46 +00:00
Guido Cella ccff82e610 options: make --cover-art-auto=exact the default
Now that a separate --cover-art-whitelist option exists, files like
cover.jpg are loaded even without setting --cover-art-auto to fuzzy, so
only load files that have exactly the media filename by default, since
fuzzy loading is probably more likely to load unwanted images than to
load cover art that the user intended to display, especially if you play
audio files with a short filename like a.mp3.
2022-04-21 16:42:27 +00:00
Guido Cella 9d2a6dc302 player: add cover-art-whitelist option
This allows more fine grained control over which cover art to load. With
--cover-art-auto=exact and --cover-art-whitelist=yes, you can now load
cover art with the exact media filename and the whitelisted filenames,
but not cover art that contains the media filename
(--cover-art-auto=fuzzy).
2022-04-21 16:42:27 +00:00
hooke007 c317abbb63 DOCS: fix the typo of --sub-justify 2022-04-21 16:04:50 +00:00
hooke007 7b5c6dfd57 DOCS: correct --sub-shadow-color 2022-04-21 16:04:50 +00:00
Guido Cella 120989f56a DOCS/{mpv,options}: document the watch later functionality
This adds a section to the documentation to explain how resuming
playback works, and in particular it explains how it affects which
playlist entry mpv starts playing from, since this feature was only
implied in the --playlist-start documentation.

It also groups the documentation of the watch later options together to
make them easier to find.
2022-04-21 15:07:56 +00:00
Guido Cella d6affda0a7 options: add osd-playing-msg-duration 2022-04-07 22:13:50 +00:00
Guido Cella 4930667784 DOCS/input: mark chapter-list as writable 2022-04-07 16:21:22 +00:00
Philip Langdale 73a06ffae6 drm: context_drm_egl: add support for enabling VRR
Variable Refresh Rate (VRR), aka Freesync or Adaptive Sync can be used
with DRM by setting the VRR_ENABLED property on a crtc if the
connector reports that it is VRR_CAPABLE. This is a useful feature
for us as it is common to play 24/25/50 fps content on displays that
are nominally locked to 60Hz. VRR can allow this content to play at
native framerates.

This is a simple change as we just need to check the capability
and set the enabled property if requested by the user. I've defaulted
it to disabled for now, but it might make sense to default to auto
in the long term.
2022-04-05 20:56:36 -07:00
Lynne f61eda0f5e vd_lavc: add vo caps and option to set GPU film grain application 2022-04-05 15:02:18 +02:00
Lynne 7230550191 vf_format: support forwarding/stripping film grain metadata 2022-04-05 15:02:18 +02:00
Philip Langdale d598ab2b24 DOCS/options.rst DOCS/vo.rst: Update discussion of hwdec usage
The documentation's current discussion of hwdec usage is out of date,
and unnecessarily pessemistic when applied to modern hardware. The
reality is that modern APIs on modern hardware produce reasonable
results and there's no need to pretend otherwise. The current language
that tries to drive people away from using hwdecs at all leads to them
making bad choices when they do try to use it.

Let's also make it clearer that users should use vo=gpu with hwdecs
rather than vo=vaapi or vo=vdpau. Even the existing admonitions have
proven insufficient, so let's strengthen that language.
2022-03-09 10:51:35 -08:00
Niklas Haas dfe846f9de vo_gpu_next: add support for hardware decoding
There are two major ways of going about this:

1. Expose the native ra_gl/ra_pl/ra_d3d11 objects to the pre-existing
   hwdec mappers, and then add code in vo_gpu_next to rewrap those
   ra_tex objects into pl_tex.

2. Wrap the underlying pl_opengl/pl_d3d11 into a ra_pl object and expose
   it to the hwdec mappers, then directly use the resulting pl_tex.

I ultimately opted for approach 1 because it enables compatibility with
more hardware decoders, specifically including ones that use native
OpenGL calls currently. The second approach only really works with
cuda_vk and vaapi_pl.
2022-03-03 13:06:05 +01:00
Niklas Haas c13f5f24cd manpage: add vo_gpu_next wiki link to manpage
I was initially hesitant to link to an external article from the manpage
but a lot of other places in the man page already do something like
this, and it really makes more sense to have this as a wiki article
rather than trying to keep the manpage up-to-date by hand, since this
evolves quickly and the two are expected to converge over time.
2022-03-03 13:06:05 +01:00
Dudemanguy 27c38eac10 options: add always to stop-screensaver
The stop-screensaver option is currently limited to a simple yes/no
option. While the no option does always disable mpv trying to stop the
screensaver, yes does not mean the screensaver is always stopped. The
screensaver will be enabled again depending on certain conditions (like
if the player is paused). Simply introduce a new value for this option,
always, which does exactly what the name implies: the screensaver will
always be disabled.
2022-02-18 22:04:08 +00:00
Guido Cella beac97ba07 DOCS/input: document subprocess more clearly
- Make it clearer that playback_only affects subprocess' behavior when
  the playback of the current playlist entry terminates, rather than
  when mpv quits.
- Explain when status is positive and when it is negative.
- Replace "exited gracefully" in status' and error_string's
  documentation with "terminated normally" so it can't be misinterpreted
  as exiting successfully.
- Reword the playback_only warning
2022-02-18 19:39:10 +02:00
Guido Cella b89ca0c552 DOCS/input: fix typo 2022-02-18 19:39:10 +02:00
Guido Cella 25bd428393 DOCS/mpv: improve vf=rotate examples
We have a few examples with vf=rotate=90, but libavfilter's rotate
accepts radians - not degrees, so a value of 90 is valid but misleading
because it's not 90 degrees.

Change the value of 90 at those examples.

Also replace "vf-add=hflip" with "vf add hflip", since that example
lists commands, not options, to run.
2022-02-07 22:14:51 +02:00
Avi Halachmi (:avih) 7849a36beb js: utils.get_user_path: make wrapper of expand-path
When utils.get_user_path was added, the expand-path command didn't
exist. Now it does, so remove the C code, make it a trivial wrapper.

Keep this function for backward compat to not break scripts, but
technically it's not required anymore.
2022-02-04 12:53:16 +02:00
Avi Halachmi (:avih) ddef9eb52d DOCS/options.rst: fix typo (double "aspect") 2022-02-03 12:48:17 +02:00
Jan Ekström 053f10003c vo_gpu_next: initial attempt at adding d3d11 support 2022-02-02 22:53:32 +02:00
Avi Halachmi (:avih) 9fd9239990 DOCS/input.rst: profile-list: profile-restore could be missing
Currently the profile-restore field is intentionally omitted if it
holds the default value (i.e. no values are stored for the profile,
and trying to restore would only warn).

See m_config_get_profiles at command.c .
2022-01-30 15:13:10 +02:00
rim adc32e25e0 ao_sndio: add this audio output again
Changes:
- rewrite to use new internal MPV API;
- code refactoring;
- fix buffers size calculations;
- buffer set to auto;
- reset() - clean/reinit device only after errors;
2022-01-22 18:44:34 +00:00
Dudemanguy 024e0cd4c1 options: only apply sub-visibility to primary subs
Previously, the sub-visibility option changed the visibility of all
subtitles including secondary ones. This meant that it was not possible
to only display secondary subtitles while hiding the primary ones. This
modifies the sub-visibility option so that it only affects primary
subtitles which allows only secondary subtitles to be displayed.
2022-01-22 16:22:25 +00:00
Avi Halachmi (:avih) 9cddd73f67 Revert "options: add --sub-visibility=<primary-only|secondary-only>"
This reverts commit 04f0b0abe4.

It's not a good idea to unify the names only for visibility, while
keeping secondary-* for everything else.

This needs a bit more thought before we allow secondary sub to be
visible on its own.
2022-01-19 21:56:28 +02:00
Ripose 04f0b0abe4 options: add --sub-visibility=<primary-only|secondary-only>
Adds --sub-visibility choices 'primary-only' for only displaying the
primary subtitle track, and 'secondary-only' for only displaying
secondary subtitle track.

Removes --secondary-sub-visibility and displays a message telling the
user to use --sub-visibility=yes/primary-only instead.

These changes make it so that the default 'sub-visibility' bind 'v'
cycles through all the 'sub-visibility' choices, 'no', 'yes',
'primary-only', and 'secondary-only'.
2022-01-19 14:27:04 +00:00
Thomas Weißschuh 87aba146ed ao_pipewire: Add PipeWire audio backend
The AO provides a way for mpv to directly submit audio to the PipeWire
audio server.
Doing this directly instead of going through the various compatibility
layers provided by PipeWire has the following advantages:

* It reduces complexity of going through the compatibility layers
* It allows a richer integration between mpv and PipeWire
  (for example for metadata)
* Some users report issues with the compatibility layers that to not
  occur with the native AO

For now the AO is ordered after all the other relevant AOs, so it will
most probably not be picked up by default.
This is for the following reasons:

* Currently it is not possible to detect if the PipeWire daemon that mpv
  connects to is actually driving the system audio.
  (https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1835)
* It gives the AO time to stabilize before it is used by everyone.

Based-on-patch-by: Oschowa <oschowa@web.de>
Based-on-patch-by: Andreas Kempf <aakempf@gmail.com>
Helped-by: Ivan <etircopyhdot@gmail.com>
2022-01-17 11:43:02 -08:00
Niklas Haas 05ccc51d53 vf_format: add dolbyvision sub-option
Useful to strip dolbyvision from the output, in cases where the user
does not want it applied. Doing this as a video filter gives users the
abiilty to easily toggle this stripping at runtime in a way that
properly propagates to any (potentially stateful) VO.

It also thematically fits the rest of the options in vf_format, which
are similarly concerned with modifying the video image parameters.
2022-01-09 13:06:27 +01:00
Niklas Haas d09c73c7b2 vo_gpu: add --tone-mapping-mode
This merges the old desaturation control options into a single
enumeration, with the goal of both simplifying how these options work
and also making this list more extensible (including, notably, new
options only supported by vo_gpu_next).

For the hybrid option, I decided to port the (slightly tweaked) values
from libplacebo's pre-refactor defaults, rather than the old values we
had in mpv, to more visually match the look of the vo_gpu_next hybrid.
2022-01-07 06:28:14 +01:00
Niklas Haas f3fccfc395 vo_gpu: add --gamut-mapping-mode
Merge --gamut-clipping and --gamut-warning into a single option,
--gamut-mapping-mode, better corresponding to the new vo_gpu_next APIs
and allowing us to easily extend this option as new modes are added in
the future.
2022-01-07 06:28:14 +01:00
Niklas Haas a9cb2e2821 vo_gpu_next: update for new tone mapping options
This was significantly refactored upstream. Switch to new APIs and add
new tone mapping curves and options.

cf. https://code.videolan.org/videolan/libplacebo/-/merge_requests/212
2022-01-07 06:28:14 +01:00
sfan5 f9fd50c654 player: make deprecated track/chapter/metadata events internal
We still need these to track or notify of modifications to certain properties,
but they're now gone from the libmpv ABI.
2021-12-15 12:29:10 +01:00
sfan5 dfcd561ba9 lua: remove mp.suspend, resume and resume_all
These functions were deprecated in v0.21.0 and no-ops
since v0.23.0. The matching client API functions were
removed in the previous commit.
2021-12-15 12:29:10 +01:00
sfan5 632059816a libmpv: remove opengl_cb API and other deprecated symbols
Not all deprecated symbols were removed. Only three events were removed for now
since these are not used internally.
This bumps the library version to 2.0.
2021-12-15 12:29:10 +01:00
sfan5 72915e8b76 {player,video}: remove references to obsolete opengl-cb API 2021-12-15 12:29:10 +01:00
Ivan 87ce3b31a9 ao_openal: enable AL_SOFT_direct_channels_remix extension by default
Prevent audio distortions caused by OpenAL's 3D effects.
2021-11-29 11:27:39 +01:00
Avi Halachmi (:avih) b8926dd484 osc: add options: chapters/playlist OSD, hover chapter format
Previously OSD was always displayed on {ch,pl}_{next,prev} left-click,
and seekbar-hover-chapter was always enabled and with fixed format.

Now it can be controlled with:
- chapters_osd, playlist_osd: yes/no (only affects left-click).
- chapter_fmt: lua string.format template, or "no" to disable.

Fixes #4675
2021-11-25 21:20:48 +02:00
sfan5 dc73f1ad4b vo_gpu_next: implement OpenGL context support
Wrapping the context is pretty straightforward. This is only complicated
by needing to account for the upside-down framebuffer in a few places.
2021-11-22 18:08:56 +01:00
Dudemanguy 59898331dd DOCS/ao: remove incorrect note about openal
The audio rewrite in d27ad96542 originally
broke this ao. However, 0ac724f002 fixed
and the documentation was never updated to reflect that. OpenAL has
worked fine for a while not. Just remove this sentence.
2021-11-19 16:57:37 -06:00