Commit Graph

170 Commits

Author SHA1 Message Date
wm4 5f1ff78516 command: add cache-speed property
Should reflect I/O speed.

This could go into the terminal status line. But I'm not sure how to put
it there, since it already uses too much space, so it's not there yet.
2016-03-20 19:51:22 +01:00
wm4 a1ffd7407d manpage: fix inverted condition in mixer-active description
Still not sure if the current text is actually understandable.

Also fix a typo.
2016-03-13 15:58:46 +01:00
wm4 7387766445 command: change stream-pos semantics
Changing the byte stream position without cooperation of the demuxer
seems a bit insane, and is certainly useless. A user should do factor
seeks instead. For formats like ts, this will actually translate to byte
seeks, while treating the rest of the playback chain a bit more
gracefully. With this argument, remove write access to this property.

If someone really complains, proper byte seeks could be added as seek
mode (although I'm going to need a convincing argument for this).

Read access changes too, but in a more subtle way.
2016-03-09 23:34:04 +01:00
wm4 33774e18ed command: add encoder-list property
Also change decoder-list (for the sake of sharing the underlying code
for both properties).
2016-03-01 21:46:57 +01:00
wm4 4bb94f1306 command: export canonical ffmpeg version identifier
Was printed only with "mpv -h" or so.
2016-02-29 20:59:20 +01:00
wm4 d7de123110 command: export list of all decoders
Was only available via --vd=help and --ad=help (i.e. not at all via
client API). Not bothering with separating audio and video codecs, since
this list isn't all that useful anyway in general. If someone complains,
a type field could be added.
2016-02-29 20:57:56 +01:00
wm4 0a1e926670 command: export more information under track-list
Export a number of container fields, which may or may not be useful in
some scenarios. They are explicitly marked as originating from the
demuxer, in order to make it explicit that they might be unreliable.

I'd actually like to remove all other cases where container information
is exported, but those numerous cases are going to be somewhat hard to
deprecate.

Also, not directly related, export the description of the currently
active decoder. (This has been requested before.)
2016-02-29 20:56:08 +01:00
wm4 39ab426f05 player: add on_preloaded hook
(Limited usefulness.)
2016-02-15 16:19:19 +01:00
wm4 d8aeeaa4b1 command: always allow setting volume/mute properties
This seems generally easier when using libmpv (and was already requested
and implemented before: see commit 327a779a; it was reverted some time
later).

With the weird internal logic we have to deal with, in particular the
--softvol=no case (using system volume), and using the audio API's mixer
(--softvol=auto on some systems), we still can't avoid all glitches and
corner cases that complicate this issue so much. The API user is either
recommended to use --softvol=yes or auto, or to watch the new
mixer-active property, and assume the volume/mute properties have
significant values if the mixer is active.

Remaining glitches:
- changing the volume/mute properties has no effect if no internal mixer
  is used (--softvol=no) and the mixer is not active; the actual mixer
  controls do not change, only the property values
- --volume/--mute do not have an effect on the volume/mute properties
  before mixer initialization (the options strictly are only applied
  during mixer init)
- volume-max is 100 while the mixer is not active
2016-01-26 15:23:09 +01:00
wm4 fae88b8113 manpage: adjust vf/af-command description 2016-01-22 21:20:23 +01:00
wm4 f176104ed5 command: add af-command command
Similar to vf-command. Requested. Untested.
2016-01-22 20:36:54 +01:00
wm4 135a7217b9 command: add vf-command command 2016-01-22 16:18:28 +01:00
Oliver Freyermuth 909b8f89d8 man: input: document new DVB bindings and properties.
There is now H and K for DVB-channel switching,
and the properties dvb-channel (W) and dvb-channel-name (RW).
2016-01-14 00:36:53 +01:00
wm4 b0381d27eb input: add a catch-all "unmapped" command
This can be used to grab all unmapped keys.

Fixes #2612.
2015-12-23 19:13:45 +01:00
wm4 3e1aed8f40 input: add key name to script-binding command response
The "script-binding" command is used by the Lua scripting wrapper to
register key bindings on the fly. It's also the only way to get fine-
grained information about key events (such as separate key up/down
events). This information is sent via a "key-binding" message when the
state of a key changes.

Extend it to send name of the mapped key itself. Previously, it was
assumed that the user just uses an unique identifier for the binding's
name, so it wasn't needed. With this change, a user can map exactly the
same command to multiple keys, which is useful especially with the next
commit.

Part of #2612.
2015-12-23 19:10:48 +01:00
Martin Herkt fc9eef3b81
man: fix grammar issues 2015-12-19 09:26:41 +01:00
wm4 0262295c4b manpage: reflect recent subtitle changes 2015-12-06 01:15:08 +01:00
wm4 ece794d905 manpage: explain behavior of "path" property
This seems to confuse users pretty often, but I'm not going to change
its behavior.

See e.g. #2541.
2015-11-29 17:56:08 +01:00
wm4 772961f0ce command, vo: add estimated-display-fps property
This is simply the average refresh rate. Including "bad" samples is
actually an advantage, because the property exists only for
informational purposes, and will reflect problems such as the driver
skipping a vsync.

Also export the standard deviation of the vsync frame duration
(normalized to the range 0-1) as vsync-jitter property.
2015-11-25 22:07:56 +01:00
wm4 01a2af6c7c command: export some per-video-frame information
Utterly useless, but requested. Fixes #2444.
2015-11-22 18:54:22 +01:00
wm4 70df1608d6 player: handle rebasing start time differently
Most of this is explained in the DOCS additions.

This gives us slightly more sanity, because there is less interaction
between the various parts. The goal is getting rid of the video_offset
entirely.

The simplification extends to the user API. In particular, we don't need
to fix missing parts in the API, such as the lack for a seek command
that seeks relatively to the start time. All these things are now
transparent.

(If someone really wants to know the real timestamps/start time, new
properties would have to be added.)
2015-11-16 22:47:17 +01:00
wm4 d5981924fe command: add vsync-ratio property
This is very "illustrative", unlike the video-speed-correction
property, and thus useful. It can also be used to observe scheduling
errors, which are not detected by the core. (These happen due to
rounding errors; possibly not evne our fault, but coming from
files with rounded timestamps and so on.)
2015-11-13 22:48:32 +01:00
wm4 f0feea5591 command: rename vo-missed-frame-count property
"Missed" implies the frame was dropped, but what really happens is that
the following frame will be shown later than intended (due to the
current frame skipping a vsync).

(As of this commit, this property is still inactive and always
returns 0. See git blame for details.)
2015-11-13 22:41:41 +01:00
wm4 8baf773d0e command: make display-fps property writable
Has the same function as setting the option.

This commit changes the property in a bunch of other ways. For example
if the VO is not created, it will return the option value.
2015-11-09 13:59:25 +01:00
wm4 7aba3a5d96 command: add mistimed-frame-count property
Does what the manpage says. This is a replacement incrementing the
dropped frame counter (see previous commit).
2015-10-30 14:05:41 +01:00
wm4 8e654d3f78 video: remove user-controllable PTS sorting (--pts-association-mode)
Useless. Sometimes it might be useful to make some extremely broken
files work, but on the other hand --no-correct-pts is sufficient for
these cases.

While we still need some of the code for AVI, the "auto" mode in
particular inflated the size of the code.
2015-10-06 18:19:20 +02:00
wm4 ee63c9c210 video: replace vf_format outputlevels option with global option
The vf_format suboption is replaced with --video-output-levels (a global
option and property). In particular, the parameter is removed from
mp_image_params. The mechanism is moved to the "video equalizer", which
also handles common video output customization like brightness and
contrast controls.

The new code is slightly cleaner, and the top-level option is slightly
more user-friendly than as vf_format sub-option.
2015-09-29 21:12:26 +02:00
wm4 4e0e24c3c2 af_lavfi: implement af-metadata property
Works like vf-metadata. Unfortunately requires some code duplication
(even though it's not much).

Fixes #2311.
2015-09-11 23:04:02 +02:00
wm4 2492b5f119 cache: do not include backbuffer size in total stream cache size
This causes weirdness with the "cache-size" property and option. Only
the read handler of the property included the backbuffer, while all
others did not. Make it consistent, and subtract the backbuffer size
from the cache size.

Fixes #2305.
2015-09-10 14:15:45 +02:00
wm4 8565073f68 command: make the playback-time property writable
Provides a simplistic way to seek without having to care about weird
situations like timestamp vs. playback time. This is good, because the
seek command is currently timestamp based, so when using the seek
command the user _does_ have to care.
2015-08-21 15:53:24 +02:00
wm4 594071dbf4 manpage: fix typo
Actually, this was unintentionally changed in commit 70e0bc1e.
2015-08-18 23:11:11 +02:00
wm4 031555fbe6 player: add display sync mode
If this mode is enabled, the player tries to strictly synchronize video
to display refresh. It will adjust playback speed to match the display,
so if you play 23.976 fps video on a 24 Hz screen, playback speed is
increased by approximately 1/1000. Audio wll be resampled to keep up
with playback.

This is different from the default sync mode, which will sync video to
audio, with the consequence that video might skip or repeat a frame once
in a while to make video keep up with audio.

This is still unpolished. There are some major problems as well; in
particular, mkv VFR files won't work well. The reason is that Matroska
is terrible and rounds timestamps to milliseconds. This makes it rather
hard to guess the framerate of a section of video that is playing. We
could probably fix this by just accepting jittery timestamps (instead
of explicitly disabling the sync code in this case), but I'm not ready
to accept such a solution yet.

Another issue is that we are extremely reliant on OS video and audio
APIs working in an expected manner, which of course is not too often
the case. Consequently, the new sync mode is a bit fragile.
2015-08-10 18:48:45 +02:00
wm4 fedaad8250 player: separate controls for user and video controlled speed
For video sync, we want separate playback speed controls for user-
requested speed and the "correction" speed for video timing. Further, we
use this separation to make sure only a resampler is inserted if
playback speed is only changed for video sync correction.

As of this commit, this is basically inactive code. It's just
preparation for the video sync code (the following commit).
2015-08-10 18:40:16 +02:00
wm4 70e0bc1e4a manpage: use - as separator for the remaining commands
See commit 289705da. These manpage parts were just forgotten when
updating the command descriptions.
2015-08-06 00:35:09 +02:00
wm4 d6c99bcda2 lua: implement input_enable_section/input_disable_section via commands
Removes some more internal API calls from the Lua scripting backend.
Which is good, because ideally the scripting backend would use libmpv
functions only.

One awkwardness is that mouse sections are still not supported by the
public commands (and probably will never), so flags like allow-hide-
cursor make no sense to an outside user.

Also, the way flags are passed to the Lua function changes. But that's
ok, because they're only undocumented internal functions, and not
supposed to be used by script users. osc.lua only does due to historical
reasons.
2015-08-06 00:31:47 +02:00
wm4 caebbded67 command: define-section with empty contents removes a section 2015-08-06 00:17:30 +02:00
wm4 d1179f9501 command: add a command for defining input bindings
This was requested. It was more or less present internally already and
used for Lua scripting. Lua will switch to the "public" functions in
the following commits.
2015-08-06 00:16:45 +02:00
wm4 f792f56440 player: remove higher-level remains of DVD/BD menu support
Nobody wanted to restore this, so it gets the boot.

If anyone still wants to volunteer to restore menu support, this would
be welcome. (I might even try it myself if I feel masochistic and like
wasting a lot of time for nothing.) But if it does get restored, it
should be done differently. There were many stupid things about how it
was done. For example, it somehow tried to pull mp_nav_events through
all the layers (including needing to "buffer" them in the demuxer),
which was needlessly complicated. It could be done simpler.

This code was already inactive, so this commit actually changes nothing.
Also keep in mind that normal DVD/BD playback still works.
2015-08-03 23:49:14 +02:00
wm4 3cbf68b470 command: add property indicating per-file options
Fixes #2165, more or less.
2015-07-23 22:59:04 +02:00
deuiore 7984fde8de command: add track-list/N/audio-channels property
Signed-off-by: wm4 <wm4@nowhere>

(With some heavy modifications from the original patch.)
2015-07-18 19:05:25 +02:00
wm4 8e82a64f56 player: parse and expose m3u playlist titles
Requested. Closes #2100.
2015-07-10 21:22:35 +02:00
wm4 bf739ca324 manpage: fix copy&paste mistakes
These are definitely not per-track.

(Maybe we should just provide a script or such which pretty-prints
"native" property output.
2015-06-30 12:17:58 +02:00
Daniel Bergmann 8b479d2f66 DOCS/man: fix some grammar errors
Signed-off-by: wm4 <wm4@nowhere>
2015-06-29 19:03:51 +02:00
wm4 b2e1c91f40 DOCS: fix recent typos
Pointed out by a certain wiiaboo.
2015-06-28 13:23:16 +02:00
wm4 26f52c5730 demux: export forced flag
At least Matroska files have a "forced" flag (in addition to the
"default" flag). Export this flag. Treat it almost like the default
flag, but with slightly higher priority.
2015-06-27 22:02:24 +02:00
wm4 5a3cdb8f1e audio: output human-readable channel layouts too
This gets you the "logical" channel layout, instead of the exact thing
we're sending to the AO. (Tired of the cryptic shit ALSA gives me.)
2015-06-25 19:10:24 +02:00
wm4 ddd6f5a9d7 manpage: minor fixes 2015-06-23 15:33:07 +02:00
wm4 68e7e89835 command: export stereo 3D tags
Fixes #2066.
2015-06-23 15:20:21 +02:00
Marcin Kurczewski 797277a233 Various spelling fixes
Signed-off-by: wm4 <wm4@nowhere>
2015-06-18 19:36:58 +02:00
rrooij a87b18aa5a DOCS/manpage: fix typos
Fix some errors in the man pages by spell checking them. Most of them
were typos.

Signed-off-by: wm4 <wm4@nowhere>
2015-06-17 20:13:34 +02:00