Commit Graph

9684 Commits

Author SHA1 Message Date
wm4 637e3e975c manpage: document 'A' key
Of course this was forgotten in commit 189087c.
2015-01-26 10:01:17 +01:00
Diogo Franco (Kovensky) 484e9f8090 manpage: fix typo 2015-01-26 15:15:42 +09:00
wm4 06b1a2f145 manpage: fix smoothmotion-threshold value range 2015-01-26 07:05:59 +01:00
wm4 f033eaff9b options: make --hls-bitrate=max the default
The previous default ("no") seemed to be equivalent to "min" in practice
(though it might depend on the website, which is even worse).

Better just select the best stream by default.
2015-01-26 03:58:13 +01:00
wm4 78f1f2017c manpage: describe some more config directory artifacts 2015-01-26 03:20:35 +01:00
wm4 df3e6b549c vo_opengl, x11: implement icc-profile-auto
This queries the _ICC_PROFILE property on the root window. It also tries
to reload the ICC when it changes, or if the mpv window changes the
monitor. (If multiple monitors are covered, mpv will randomly select one
of them.)

The official spec is a dead link on freedesktop.org, so don't blame me
for any bugs.

Note that this assumes that Xinerama screen numbers match the way mpv
enumerates the xrandr monitors. Although there is some chance that this
matches, it most likely doesn't, and we actually have to do complicated
things to map the screen numbers. If it turns out that this is required,
I will fix it as soon as someone with a suitable setup for testing the
fix reports it.
2015-01-26 02:18:47 +01:00
wm4 dc1793048f vo_opengl: make "mitchell" the hq default filter for downscaling
Seems like several people agree that it's a good filter for downscaling.

Setting this option by default may also prevent people from accidentally
using an unsuitable filter for downscaling by setting "scale" and
without being aware of the impliciations (maybe). On the other hand,
this change is not strictly backwards compatible for the same reasons.

Also, allow disabling this option with scale-down="" (before this, not
setting it was the only way to do this - not possible anymore if it's
set by default). This is what the change in handle_scaler_opt() does.
2015-01-26 02:03:44 +01:00
xylosper 4a1a0e98d8 input, player: new command for mouse event
New command `mouse <x> <y> [<button> [single|double]]` is introduced.
This will update mouse position with given coordinate (`<x>`, `<y>`),
and additionally, send single-click or double-click event if `<button>`
is given.
2015-01-23 22:07:47 +01:00
wm4 a0a40eb287 vo: fix disabling/enabling smoothmotion at runtime
vo.c queried the VO at initialization whether it wants to be updated on
every display frame, or every video frame. If the smoothmotion option
was changed at runtime, the rendering mode in vo.c wasn't updated.

Just let vo_opengl set the mode directly. Abuse the existing
vo_set_flip_queue_offset() function for this.

Also add a comment suggesting the use of --display-fps to the manpage,
which doesn't have anything to do with the rest of this commit, but is
important to make smoothmotion run well.
2015-01-23 20:56:25 +01:00
wm4 17e1e9f486 manpage: minor changes
Mostly related to vo_opengl.

Fix the opengl lscale option in the qml example too.
2015-01-23 17:41:50 +01:00
wm4 9681d42a94 command: export file format as property
Repurpose demuxer->filetype for this. It used to be used to print a
human readable format description; change it to a symbolic format name
and export it as property.

Unfortunately, libavformat has its own weird conventions, which are
reflected through the new property, e.g. the .mp4 case mentioned in the
manpage.

Fixes #1504.
2015-01-23 15:59:06 +01:00
wm4 a0ed62fc1d build: remove bogus client API examples build
The symlink trick made waf go crazy (deleting source files, getting
tangled up in infinite recursion... I wish I was joking). This means we
still can't build the client API examples in a reasonable way using the
include files of the local repository (instead of globally installed
headers). Not building them at all is better than deleting source files.

Instead, provide some manual instructions how to build each example
(except for the Qt examples, which provide qmake project files).
2015-01-23 15:32:23 +01:00
wm4 e5bceb061b vf_vavpp: add more deinterlacing algorithms
These are untested due to lack of hardware. From what I've heard, the
drivers are pretty buggy, so it's not clear how well this works, if at
all.
2015-01-23 13:26:41 +01:00
Stefano Pigozzi c29ab5a46b vo_opengl: add smoothmotion frame blending
SmoothMotion is a way to time and blend frames made popular by MadVR. It's
intended behaviour is to remove stuttering caused by mismatches between the
display refresh rate and the video fps, while preserving the video's original
artistic qualities (no soap opera effect). It's supposed to make 24fps video
playback on 60hz monitors as close as possible to a 24hz monitor.

Instead of drawing a frame once once it's pts has passed the vsync time, we
redraw at the display refresh rate, and if we detect the vsync is between two
frames we interpolated them (depending on their position relative to the vsync).
We actually interpolate as few frames as possible to avoid a blur effect as
much as possible. For example, if we were to play back a 1fps video on a 60hz
monitor, we would blend at most on 1 vsync for each frame (while the other 59
vsyncs would be rendered as is).

Frame interpolation is always done before scaling and in linear light when
possible (an ICC profile is used, or :srgb is used).
2015-01-23 09:14:41 +01:00
wm4 e872852bcb manpage: vo_opengl: describe how to get lanczos2/lanczos3
These aliases were removed in commit 1ec77214. Add a notice to the
manpage how to get these back. Apparently, "lanczos2" and "lanczos3"
were the only interesting aliases possibly used by someone, so the
description is limited to these two.
2015-01-22 20:06:27 +01:00
Niklas Haas 27261bea31
vo_opengl: remove scale-sep and indirect options
These are now auto-detected sanely; and enabled whenever it would be a
performance or quality gain (which is pretty much everything except
bilinear/bilinear scaling).

Perhaps notably, with the absence of scale_sep, there's no more way to
use convolution filters on hardware without FBOs, but I don't think
there's hardware in existence that doesn't have FBOs but is still fast
enough to run the fallback (slow) 2D convolution filters, so I don't
think it's a net loss.
2015-01-22 19:40:06 +01:00
Niklas Haas 8eb9ddd868 vo_opengl: rename all scale options to make more sense
This emphasizes the fact that scale is used for *all* image upscaling,
with cscale only serving a minor role for subsampled material.
2015-01-22 19:40:04 +01:00
Niklas Haas f24c2e0f56 vo_opengl: always prefer indirect scaling
This is better even for non-separable. The only exception is when using
bilinear for both lscale and cscale. I've fixed the
documentation/comments to make more sense.
2015-01-22 19:40:04 +01:00
Niklas Haas 2d182fdea0
vo_opengl: implement naive anti-ringing
This is not quite the same thing as madVR's antiringing algorithm, but
it essentially does something similar.

Porting madVR's approach to elliptic coordinates will take some amount
of thought.
2015-01-22 19:39:58 +01:00
Niklas Haas edc100eee0
vo_opengl: make the default radius 3.0 and simplify scaler documentation
This also fixes the maximum range to 16.0, which was previously set to
32.0 and incorrectly documented as 8.0. 16 taps should be more than
anybody will ever need, but it's the highest radius that's supported by
all affected filters.
2015-01-21 23:08:41 +01:00
wm4 e7171892e7 manpage: vo_opengl: change scaler descriptions and recommendations
Based on suggestions by lachs0r.
2015-01-21 22:22:42 +01:00
wm4 724f722d7f vo_opengl_old: remove this VO
At this point, there is probably no hardware left that doesn't do
OpenGL 2.1, and at the same time is fast enough to handle video.
2015-01-20 21:15:04 +01:00
wm4 061d9b1afe README: extend dependecy list, link Windows compilation docs
Also, fix vo.rst, don't want to waste a separate commit on this.
2015-01-20 15:23:21 +01:00
wm4 6f5e5e6a9e vo_opengl: remove cscale-down suboption
For an explanation see the additions to the manpage.
2015-01-20 14:33:53 +01:00
wm4 64f72687ce client API: notify API user on event queue overflow
Before this, we merely printed a message to the terminal. Now the API
user can determine this properly. This might be important for API users
which somehow maintain complex state, which all has to be invalidated if
(state-changing) events are missing due to an overflow.

This also forces the client API user to empty the event queue, which is
good, because otherwise the event queue would reach the "filled up"
state immediately again due to further asynchronous events being added
to the queue.

Also add some minor improvements to mpv_wait_event() documentation, and
some other minor cosmetic changes.
2015-01-19 21:26:42 +01:00
wm4 eb5a83e1c1 x11: add --on-all-workspaces option and property
Fixes #1469.
2015-01-16 23:38:47 +01:00
wm4 1883b7cc0c player: add --autofit-smaller option
Fixes #1472.

(Maybe these options should have been named --autofit-max and
--autofit-min, but since --autofit-larger already exists, use
--autofit-smaller for symmetry.)
2015-01-16 22:30:41 +01:00
wm4 0092ae8676 manpage: fix osd-ass-cc examples
The "\\" escape was rendered as "\" on the website. I'm hoping quoting
this in ``...`` will render it correctly.

Also add an example for show_text, which awkwardly does not require
escaping the "\".
2015-01-16 12:17:55 +01:00
Niklas Haas 61f5a80f10
vo_opengl: get rid of approx-gamma and make it the default as per BT.1886
After finding out more about how video mastering is done in the real
world it dawned upon me why the "hack" we figured out in #534 looks so
much better.

Since mastering studios have historically been using only CRTs, the
practice adopted for backwards compatibility was to simulate CRT
responses even on modern digital monitors, a practice so ubiquitous that
the ITU-R formalized it in R-Rec BT.1886 to be precisely gamma 2.40.

As such, we finally have enough proof to get rid of the option
altogether and just always do that.

The value 1.961 is a rounded version of my experimentally obtained
approximation of the BT.709 curve, which resulted in a value of around
1.9610336. This is the closest average match to the source brightness
while preserving the nonlinear response of the BT.1886 ideal monitor.

For playback in dark environments, it's expected that the gamma shift
should be reproduced by a user controlled setting, up to a maximum of
1.224 (2.4/1.961) for a pitch black environment.

More information:
https://developer.apple.com/library/mac/technotes/tn2257/_index.html
2015-01-16 02:17:19 +01:00
Niklas Haas 7aaf71861e
manpage: changes.rst: document vo_opengl's placebo features 2015-01-15 21:32:19 +01:00
Niklas Haas 26baf5b9da
vo_opengl: add ewa_lanczos upscaler (aka jinc)
This is the polar (elliptic weighted average) version of lanczos.
This introduces a general new form of polar filters.
2015-01-15 21:20:27 +01:00
wm4 c88b535c46 DOCS/client_api_examples: fix locale nonsense in qml examples
The Qt example already does this. I hoped this was restricted to
QApplication only, but apparently Qt repeated this mistake with
QGuiApplication (QGuiApplication was specifically added for QtQuick at a
much later point, even though QApplication inherits from it).
2015-01-15 20:08:57 +01:00
wm4 c8ecb66269 ao_pcm: add append mode
Pretty useful for debugging, although a bit useless or possibly
misleading too (see comments in the manpage).
2015-01-14 22:14:56 +01:00
wm4 53a5923ba1 manpage: fix references to vf_pp
It was removed, but is still available through FFmpeg.

Fixes #1468.
2015-01-13 16:54:59 +01:00
wm4 ab185a2d42 manpage: improve --title description
It might be rather surprising that --title also sets the audio stream
title (for PulseAudio and wasapi), so it certainly should be mentioned.
2015-01-12 14:21:16 +01:00
wm4 fc95678d8d x11: support XEmbed
Seems to work with GtkSocket and passing the gtk_socket_get_id() value
via "wid" option to mpv.

One caveat is that using <tab> to move input focus from mpv to GTK does
not work. It seems we would have to interpret <tab> ourselves in this
case. I'm not sure if we really should do this - it would probably
require emulating some other typical conventions too. I'm not sure if an
embedder could do something about this on the toolkit level, but in
theory it would be possible, so leave it as is for now.
2015-01-12 12:08:48 +01:00
wm4 3f3e1547ba player: change --display-tags behavior
Remove the "all" special-behavior, and instead interpret trailing "*"
characters. --display-tags=all is replaced by --display-tags=* as a
special-case of the new behavior.

See #1404.

Note that the most straight-forward value for matchlen in the normal
case would be INT_MAX, because it should be using the entire string.
I used keylen+1 instead, because glibc seems to handle this case
incorrectly:

    snprintf(buf, sizeof(buf), "%.*s", INT_MAX, "hello");

The result is empty, instead of just containing the string argument.
This might be a glibc bug; it works with other libcs (even MinGW-w64).
2015-01-12 04:57:56 +01:00
wm4 e96c08ecb5 command: fix property naming convention
Use "-" instead of "_" as separator.
2015-01-10 21:16:34 +01:00
wm4 e5f2072364 command: change properties added in previous commit
Make their meaning more exact, and don't pretend that there's a
reasonable definition for "bits-per-pixel". Also make unset fields
unavailable.

average_depth still might be inconsistent: for example, 10 bit 4:2:0 is
identified as 24 bits, but RGB 4:4:4 as 12 bits. So YUV formats
seemingly drop the per-component padding, while RGB formats do not.
Internally it's consistent though: 10 bit YUV components are read as
16 bit, and the padding must be 0 (it's basically like an odd fixed-
point representation, rather than a bitfield).
2015-01-10 19:13:16 +01:00
xylosper 242558bec1 command.c: new subproperties for video-params: bpp and depth
bpp(bits-per-pixel) and depth(bit-depth for color component) can
be calculated from pixelformat technically but it requires massive
informations to be implemented in client side.

These subproperties are provided for convenience.
2015-01-10 18:53:03 +01:00
wm4 3c3883ebe1 DOCS/client_api_examples: qml_direct: QWindow::size() is not thread-safe
We still keep the window pointer, because we want to call
QQuickWindow::resetOpenGLState() (which runs on the rendering thread
only). Interesting mess...
2015-01-09 16:00:16 +01:00
wm4 803e579ff5 DOCS/client_api_examples: qml: reduce number of files
This is annoying.
2015-01-09 15:49:34 +01:00
James Ross-Gowan f2fd0c48cc DOCS/compile-windows.md: fix pkg-config directory 2015-01-09 13:30:35 +11:00
Niklas Haas 286340d7d0 video: Add sigmoidal upscaling to avoid ringing artifacts
This avoids issues when upscaling directly in linear light, and is the
recommended way to upscale images according to imagemagick.

The default slope of 6.5 offers a reasonable compromise between
ringing artifacts eliminated and ringing artifacts introduced by
sigmoid-upscaling. Same goes for the default center of 0.75.
2015-01-09 03:18:21 +01:00
xylosper 5b4d587ede vo_opengl_cb: introduce frame queue
The previous implementation of opengl-cb kept only latest flipped frame.
This can cause massive frame drops because rendering is done asynchronously
and only the latest frame can be rendered.

This commit introduces frame queue and releated options to opengl-cb.

frame-queue-size: the maximum size of frame queue (1-100, default: 1)
frame-drop-mode: behavior when frame queue is full (pop, clear, default: pop)

The frame queue holds delayed frames and drops frames if the frame queue is
overflowed with next method:

'pop' mode: drops all the oldest frames overflown.
'clear' mode: drops all frames in queue and clear it.

With default options(frame-queue-size=1:frame-drop-mode=pop),
opengl-cb behaves in the same way as previous implementation effectively.

For frame-queue-size > 1, opengl-cb tries to calls update() without waiting
next flip_page() in order to consume queued frames.

Signed-off-by: wm4 <wm4@nowhere>
2015-01-08 18:50:25 +01:00
James Ross-Gowan 54d14b4480 DOCS: add instructions for building with MSYS2
mpv can be built natively on a Windows machine using MSYS2. Add detailed
instructions on how to build and merge them with the existing
instructions for cross-compilation.
2015-01-08 19:29:55 +11:00
wm4 f551fbaa25 DOCS/client_api_examples: add an alternative qml example
This one avoids use of a FBO. It's less flexible, because it uses works
around the whole QML rendering API. It seems to be the only way to get
OpenGL rendering without any indirections, though.

Parts of this example were insipired by Qt's "Squircle" example.

Also add a README file with a short description of each example, to
reduce the initial confusing.
2015-01-08 02:40:30 +01:00
wm4 dc2d0539c7 ao_pulse: disable latency calculation hacks by default
This used to be required to workaround PulseAudio bugs. Even later, when
the bugs were (partially?) fixed in PulseAudio, I had the feeling the
hacks gave better behavior. On the other hand, I couldn't actually
reproduce any bad behavior without the hacks lately. On top of this, it
seems our hacks sometimes perform much worse than PulseAudio's native
implementation (see #1430).

So disable the hacks by default, but still leave the code and the option
in case it still helps somewhere. Also, being able to blame PulseAudio's
code by using its native API is much easier than trying to debug our own
(mplayer2-derived) hacks.
2015-01-07 22:23:38 +01:00
Oliver Freyermuth ca32a15a22 stream_dvb: Add possibility to dump a full transponder.
Was already possible before by injecting the magic PID
8192 into channels.conf, the flag makes this much more
useable and we also have it documented.
Useful not only for debugging, but also for incomplete
channels.conf (mplayer format...), multi-channel
recording, or channels which do dynamic PID switchng.

full-transponder is also useful for channels which switch PIDs on-the-fly.
ffmpeg can handle this, but it needs the full stream with all PIDs.
2015-01-06 19:52:27 +01:00
Oliver Freyermuth 545a657ab7 manpage: dvb: Add some information on VDR channel list support.
Only really helpful for DVB-S for now.
2015-01-06 19:52:27 +01:00