Commit Graph

790 Commits

Author SHA1 Message Date
Guido Cella 0888e53fc4 manpage: mention rotate limitations with hwdec 2021-03-02 16:14:12 +02:00
Guido Cella 8a7ef58b2d manpage: video-rotate supports arbitrary steps
The 90° step limitation must be a leftover from old behavior since any
value between 0 and 359 works now.
2021-03-02 14:00:12 +01:00
Evgeny Zinoviev f913570aad mac: support --on-all-workspaces option 2021-02-21 13:38:53 +01:00
Jan Ekström b0b37df31f filters/auto_filters: switch from scaletempo to scaletempo2
Part 1 of "look how well it performs, then start cleaning up the
old one."

Closes #8376
2021-02-15 00:13:03 +02:00
Mia Herkt f60725263c
man: update deband-threshold default 2021-02-05 15:37:16 +01:00
garoto f6a92659fd manpage: fix PDF build
Not clear what exactly makes it fail with this change, but making
the note paragraph added in d5ab5482a9 a note structure seems to fix it.
2021-01-23 18:24:21 +02:00
Leo Izen d5ab5482a9 manpage: document off-by-one loop-file behavior
loop-file counts the number of zero-seeks, not playthroughs,
which makes its counter off by one compared to loop-playlist.
2021-01-07 09:15:29 -05:00
Leo Izen 1251f7bbf9 manpage: rename OS X references to macOS
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.
2021-01-03 12:05:30 -05:00
Emmanuel Gil Peyrot 5f2b60a645 vd_lavc: add VP8 to the default allowed hwdec codec list
It is supported at least on Intel, from gen8 to gen11, and still gives a
pretty welcome reduction of CPU usage on my gen9.
2020-12-30 17:30:01 +02:00
der richter af26402948 mac: use visible frame rectangle for window geometry calculation
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
2020-12-19 21:37:55 +02:00
Guido Cella 6aa7dbdb84 manpage: document background transparency
--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
2020-12-08 17:27:25 +00:00
Guido Cella d4bf179e78 manpage: clarify that you can prefetch m3u8 urls
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.
2020-12-08 17:27:14 +00:00
Dudemanguy 08848e76d9 player: add --screen-name and --fs-screen-name
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.
2020-12-06 17:36:43 +00:00
rcombs 4dcaf70b96 Revert "options: disable vsfilter blur compat by default"
This reverts commit 3d17e19c2c.

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).
2020-11-22 17:37:43 +02:00
Leo Izen 9b5672ebed manpage: document improved --playlist security
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.
2020-11-18 17:30:07 -05:00
Leo Izen dfa5ae2ad6 manpage: document av1 addition to --hwdec-codecs default setting
Document the change to add AV1 to the list of default hwdec
codecs, in commit 172146e9f7.
2020-11-05 23:05:54 +02:00
Ricardo Constantino 93f84b514a
ytdl_hook: support alternative youtube-dl path
Allows using a youtube-dl not in PATH or a compatible fork of
youtube-dl.
2020-10-27 15:42:39 +00:00
Tim Gates 2cfeee68d4 docs: fix simple typo, unminimze -> unminimize
There is a small typo in DOCS/man/options.rst.

Closes #8165
2020-10-14 19:45:52 +00:00
Chris Varenhorst 4797594347 DOCS: fix typo on sub-filter-regex-enable 2020-10-12 03:00:29 -04:00
Dudemanguy 5dc16a4a18 Revert "wayland: add wayland-display-socket option"
Pointless feature that can be done with environment variables. It was
also implemented incorrectly and broke autoprobing.

This reverts commit 015b676875.
2020-10-07 08:41:47 -05:00
Dudemanguy 015b676875 wayland: add wayland-display-socket option
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.
2020-10-06 17:45:59 +00:00
wm4 39f4fd0dc7 screenshot: add --screenshot-sw option
Probably worthless. As usual, the manpage dumps all the subtle
differences due to implementation details on the user.
2020-10-05 00:16:46 +02:00
wm4 55d7f9ded1 player: add automatic loading of external cover art files
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
2020-09-28 00:12:52 +02:00
der richter 18a35f17e2 mac: add an option to prevent focusing of the window on open
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
2020-09-25 16:48:24 +02:00
der richter 03047a0169 mac: add an option to change the App activation policy
useful to hide the app icon in the Dock if necessary.
2020-09-20 15:28:50 +02:00
der richter e28724d90d mac: add ontop window level for desktop
this puts the window ontop of the desktop but behind the desktop icons.

Fixes #7791
2020-09-20 15:28:50 +02:00
wm4 fb3facf052 msg: make --msg-time show time in seconds
More readable, similar to what --log-file will use (although the
terminal code shows microseconds and uses less left padding).
2020-09-18 14:26:41 +02:00
Guido Cella b2f4320d06 manpage: refer to --sub-color for colors
Don't make the user search for --osd-color only to make him search again
for --sub-color.
2020-09-17 10:35:35 +02:00
wm4 1643cb865f audio: fix stream-silence with push AOs (somewhat)
--audio-stream-silence is a shitty feature compensating for awful
consumer garbage, that mutes PCM at first to check whether it's
compressed audio, using formats advocated and owned by malicious patent
troll companies (who spend more money on their lawyers than paying any
technicians), wrapped in a wasteful way to make it constant bitrate
using a standard whose text is not freely available, and only rude users
want it. This feature has been carelessly broken, because it's
complicated and stupid. What would Jesus do? If not getting an aneurysm,
or pushing over tables with expensive A/V receivers on top of them, he'd
probably fix the feature. So let's take inspiration from Jesus Christ
himself, and do something as dumb as wasting some of our limited
lifetime on this incredibly stupid fucking shit.

This is tricky, because state changes like end-of-audio are supposed to
be driven by the AO driver, while playing silence precludes this. But it
seems code paths for "untimed" AOs can be reused.

But there are still problems. For example, underruns will just happen
normally (and stop audio streaming), because we don't have a separate
heuristic to check whether the buffer is "low enough" (as a consequence
of a network stall, but before the audio output itself underruns).
2020-09-03 22:39:23 +02:00
Chris Varenhorst bb1f821078 DOCS: fix minor issue on the --video-latency-hacks explanation 2020-08-28 23:36:16 -04:00
wm4 7fb972fd39 vo_gpu: EGL: fix transparency on X11/EGL/Mesa
Transparent windows on X11/EGL/native Mesa GL didn't work for various
reasons. From what I remember, the current code did work with nvidia at
least. Mesa has made attempts to fix this, but they never really made it
in.

But it turns out you can make EGL/Mesa list the EGLConfigs that use X11
RGBA visuals, and context_x11egl.c contains code that explicitly selects
them if alpha is requested (see pick_xrgba_config()).

The reason EGL/Mesa did not list them (and thus breaking transparency)
is because we requested a EGL_ALPHA_SIZE != 0 if alpha is requested. But
the transparent EGLConfigs use EGL_ALPHA_SIZE == 0. That's because EGL
doesn't actually support the concept of transparent windows; the alpha
size parameter is something else (memory rendering without FBOs or
something, I don't care enough to look up the real reasons).

This still won't work on Wayland. Every EGL backend needs platform
specific code. (Good job, EGL, such an awesome platform independent
standard.)

Fixes: #6590
2020-08-27 11:55:20 +02:00
rcombs c9474dc9ed player: add --subs-with-matching-audio option
This allows users to control whether full dialogue subtitles are displayed
with an audio track already in their preferred subtitle language.

Additionally, this improves handling for the forced flag, automatically
selecting between forced and unforced subtitle streams based on the user's
settings and the selected audio.
2020-08-19 23:44:54 -05:00
Dudemanguy 9bce236714 wayland: expose wayland-app-id as a user option
This is extremely similar to x11's WM_CLASS. This commit allows users to
set mpv's app-id at runtime for any of the wayland backends.
2020-08-14 13:02:01 +00:00
Dudemanguy bba00c133d manpage: document a couple of wayland options
--wayland-edge-pixels-pointer and --wayland-edge-pixels-touch were both
left out of the manual.
2020-08-12 15:33:06 -05:00
wm4 ed2e2894ab sub: extend range of --sub-pos option
Seems like this is requested all the time.

It seems libass allows out of range values, but does allows the subtitle
to go out of the screen at the bottom (only when moving it to the top
it's "clamped"). Too bad, don't do that then. The bitmap sub rendering
code on the other hand is under our control, and will not move a
subtitle out of the screen.

Fixes: #7986
2020-08-12 17:30:30 +02:00
wm4 13d354e46d auto_profiles: add this script
This is taken from a somewhat older proof-of-concept script. The basic
idea, and most of the implementation, is still the same. The way the
profiles are actually defined changed.

I still feel bad about this being a Lua script, and running user
expressions as Lua code in a vaguely defined environment, but I guess as
far as balance of effort/maintenance/results goes, this is fine.

It's a bit bloated (the Lua scripting state is at least 150KB or so in
total), so in order to enable this by default, I decided it should
unload itself by default if no auto-profiles are used. (And currently,
it does not actually rescan the profile list if a new config file is
loaded some time later, so the script would do nothing anyway if no auto
profiles were defined.)

This still requires defining inverse profiles for "unapplying" a
profile. Also this is still somewhat racy. Both will probably be
alleviated to some degree in the future.
2020-08-05 22:37:47 +02:00
wm4 2a89da0c85 zimg: add slice threading and use it by default
This probably makes it much faster (I wouldn't know, I didn't run any
benchmarks ). Seems to work as well (although I'm not sure, it's not
like I'd perform rigorous tests).

The scale_zimg test seems to mysteriously treat color in fully
transparent alpha differently, which makes no sense, and isn't visible
(but makes the test fail). I can't be bothered with investigating this
more. What do you do with failing tests? Correct, you disable them. Or
rather, you disable whatever appears to cause them to fail, which is the
threading in this case.

This change follows mostly the tile_example.cpp. The slice size uses a
minimum of 64, which was suggested by the zimg author. Some of this
commit is a bit inelegant and weird, such as recomputing the scale
factor for every slice, or the way slice_h is managed. Too lazy to make
this more elegant.

zimg git had a regressio around active_region (which is needed by the
slicing), which was fixed in commit 83071706b2e6bc634. Apparently, the
bug was never released, so just add a warning to the manpage.
2020-07-15 22:59:17 +02:00
wm4 4a93b046e9 x11: add option to make window appear on a specific workspace
Mess this into the --geometry option, because I like to be
irresponsible. I considered adding a separate option, but at least this
allows me to defer the question how the hell this should work as
property (geometry simply and inherently does not).

Tested on IceWM only. Option equality test and string output not tested.
2020-07-12 00:12:55 +02:00
wm4 c498b2846a x11: remove terrible xdg-screensaver hack
I'm tired of dealing with this frequent spawning of xdg-screensaver when
debugging and what not. xdg-screensaver was never a serious tool anyway,
it's more like some self-deprecating joke by FDO folks.

This will affect X11 on GNOME and other DEs. I'm singling out GNOME
though, because they are the ones actively sabotaging any sane
technical solutions and community cooperation.

I have been accused of taking it out on innocent GNOME users, while none
of this will reach GNOME developers. Of course that is not the
intention.
2020-07-08 22:45:07 +02:00
Niklas Haas ace249acc5 vo_gpu: vulkan: add ability to disable events
libplacebo exposes this feature already, because this particular type of
bug is unusually common in practice. Simply make use of it, by exposing
it as an option.

Could probably also bump the libplacebo minimum version to get rid of
the #if, but that would break debian oldoldstable or something.

Fixes #7867.
2020-06-30 20:42:52 +02:00
wm4 1194ecd154 manpage: --demuxer-seekable-cache is useless
De-emphasize it, since a user should usually not use it. This _could_ be
used to make the cache seekable with --cache=no, but it's better and
more intuitive to use --cache=yes. As such, the only use of this is for
debugging. I'm not quite sure if this should be removed entirely, but I
still see some value in it (for example if you want the cache lookahead,
but you're using a stream where cache seeking is somehow broken).
2020-06-23 20:47:22 +02:00
Niklas Haas dc24a437fb vo_gpu: add better gamut clipping option
See https://code.videolan.org/videolan/libplacebo/-/commit/d63eeb1ecc204

Enabled by default because I think it looks better. YMMV.
2020-06-19 08:09:19 +02:00
Niklas Haas c9f6c458ea vo_gpu: add BT.2390 tone-mapping
Implementation copy/pasted from:
https://code.videolan.org/videolan/libplacebo/-/commit/f793fc0480f

This brings mpv's tone mapping more in line with industry standard
practices, for a hopefully more consistent result across the board.

Note that we ignore the black point adjustment of the tone mapping
entirely. In theory we could revisit this, if we ever make black point
compensation part of the mpv rendering pipeline.
2020-06-15 01:24:09 +02:00
Niklas Haas ef6bc8504a vo_gpu: reinterpret SDR white levels based on ITU-R BT.2408
This standard says we should use a value of 203 nits instead of 100 for
mapping between SDR and HDR.

Code copied from https://code.videolan.org/videolan/libplacebo/-/commit/9d9164773

In particular, that commit also includes a test case to make sure the
implementation doesn't break roundtrips.

Relevant to #4248 and #7357.
2020-06-15 01:24:04 +02:00
wm4 5f49009849 options: add --video-scale-x/y
Requested.

Fixes: #6303
2020-06-03 17:26:44 +02:00
wm4 b1d16a2300 player: add --term-title option
This simply printf()s a concatenation of the provided string and the
relevant escape sequences. No idea what exactly defines this escape
sequence (is it just a xterm thing that is now supported relatively
widely?), and this simply uses information provided on the linked github
issue.

Not much of an advantage over --term-status-msg, though at least this
can have a lower update frequency. Also I may consider setting a default
value, and then it shouldn't conflict with the status message.

Fixes: #1725
2020-05-25 20:39:37 +02:00
wm4 502e7987d8 player: remove some display-adrop leftovers
Forgotten in one of the previous commits. Also undeprecates
display-adrop since it's out of sight now.
2020-05-23 04:24:04 +02:00
wm4 ab4e0c42fb audio: redo video-sync=display-adrop
This mode drops or repeats audio data to adapt to video speed, instead
of resampling it or such. It was added to deal with SPDIF. The
implementation was part of fill_audio_out_buffers() - the entire
function is something whose complexity exploded in my face, and which I
want to clean up, and this is hopefully a first step.

Put it in a filter, and mess with the shitty glue code. It's all sort of
roundabout and illogical, but that can be rectified later. The important
part is that it works much like the resample or scaletempo filters.

For PCM audio, this does not work on samples anymore. This makes it much
worse. But for PCM you can use saner mechanisms that sound better. Also,
something about PTS tracking is wrong. But not wasting more time on
this.
2020-05-23 04:04:46 +02:00
wm4 1826e69af2 options: add option to control display-sync factor
Can be useful to force it to adapt to extreme speed changes, while a
higher limit would just use a fraction closer to the original video
speed.

Probably useful for testing only.
2020-05-23 03:48:51 +02:00
wm4 26bd8479d0 ipc: make --input-ipc-client terminate player on connection close
As discussed in the referenced issue. This is quite a behavior change,
bit since this option is new, and not included in any releases yet, I
think it's OK.

Fixes: #7648
2020-05-14 21:40:43 +02:00