Commit Graph

9999 Commits

Author SHA1 Message Date
wm4 41d7989800 DOCS/client_api_examples/sdl: don't curse the mainloop
Fix a typo, and also reword another comment.
2015-08-17 23:56:56 +02:00
wm4 ed09e78fb9 DOCS/client_api_examples/sdl: add more explanation comments 2015-08-12 23:04:26 +02:00
wm4 a17d5e4bdd player: use OSD formattin for DS on the terminal status line 2015-08-12 22:26:35 +02:00
wm4 b103a8e113 DOCS/client_api_examples/sdl: don't load file before GL init
Could lead to failure because it's essentially a race condition.
2015-08-11 19:02:25 +02:00
wm4 f6a354e846 DOCS/client_api_examples: add SDL OpenGL example 2015-08-11 01:23:09 +02:00
wm4 2d68a2e55a manpage: fix typo 2015-08-11 00:14:13 +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 8f2d9db79f demux_mkv: disable timestamp fixup code again
This doesn't work too well if sections of the file change to a different
framerate. It lowers our chances to guess the correct FPS in the display
sync code.

For normal playback, this (probably) doesn't help that much anyway,
except that the "estimated-vf-fps" property will regress in the simplest
mkv case. This will be fixed with the next commit.

The now disabled code will probably be removed; it's not useful anymore.
2015-08-10 18:38:36 +02:00
wm4 27a17be325 manpage: document videotoolbox support 2015-08-08 18:30:41 +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 beb4f8316a demux: add options to control maximum queue size
Add --demuxer-max-packets and --demuxer-max-bytes, which control the
maximum size of the packet queue. These can be helpful to avoid
excessive memory usage.

Memory usage is the reason why there's a limit in the first place. If a
file is more or less broken, and audio and video don't line up, the
decoders will fill up the packet queue trying to read more audio or
video, and the maximum sizes are required to avoid unbounded memory
allocation. Being able to override the maximum sizes is useful; either
for restricting memory usage further, or enlarging the sizes when
attempting to play various broken files.
2015-08-05 23:41:29 +02:00
wm4 775d816096 demux: remove options to control minimum packet queue size
Remove --demuxer-readahead-packets and --demuxer-readahead-bytes. These
were a bit useless. They could force a minimum packet queue size, but
controlling the queue size with --demuxer-readahead-secs is much nicer.

It's fairly certain nobody ever used these options.
2015-08-05 23:38:23 +02:00
wm4 5aae68610e DOCS: document video-aspect behavior change
Forgotten in commit ae2f8fd0.
2015-08-05 21:29:09 +02:00
Jehan e7897dfb9b charset_conv: "auto" encoding detection now uses uchardet.
If mpv is not built with uchardet, "enca" is still the fallback default
encoding detection.
2015-08-04 17:51:00 +02:00
wm4 aca591ded3 input.conf: remap d/D keys
Drop d for toggling framedrop. Toggling this is way too special to be at
such a prominent place, and in fact I believe toggling it is pointless.

Remap deinterlacing from D to d. It's relatively useful and non-
destructive.

As suggested in #973 (almost).
2015-08-04 01:04:26 +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 a74914a057 charset_conv: add uchardet support
For now, it needs to be explicitly selected. ENCA is still the default.

This assumes uchardet returns iconv names. This doesn't seem to be
always the case, and the result are lots of iconv errors. So
explicitly check for this situation, and print a warning if it
occurs. It's entirely possible that uchardet support is actually
useless, because names are not necessarily iconv-compatible (but
uchardet doesn't seem to document whether it attempts to return
iconv-compatible names if possible).

Fixes #908.
2015-08-02 00:03:29 +02:00
wm4 3452f9aeac win32: add portable config mode
See manpage additions.

The main reason for adding this is that we can't guess whether the user
wants his config in his Windows profile or not. The user basically has
to tell mpv what should be done, and the "portable_config" directory
does this implicitly.

Fixes #2042 (approximately).
2015-07-27 21:48:30 +02:00
wm4 616d1510a7 manpage: document --audio-channels=auto caveats
This is an unfortunate fact of life. Maybe making this the default
wasn't such a good idea after all.

Also update etc/example.conf. It used an obsolete alias for "auto".
2015-07-25 22:44:06 +02:00
wm4 95b930f866 Require contributions in LGPLv2.1+
As suggested in #2033.

Additionally, change "LGPLv2+" to "LGPLv2.1+". Since this was always
used with the "and later" phrase, this doesn't require any further
discussion.

Also clarify that the "+" means "or later". This should be clear to
anyone with a brain, but you never know with copyright.
2015-07-24 23:54:51 +02:00
wm4 3cbf68b470 command: add property indicating per-file options
Fixes #2165, more or less.
2015-07-23 22:59:04 +02:00
wm4 281c21b7f1 video: don't restrict --vd-lavc-threads to a maximum of 16
Only do it when the number of threads is autodetected, as more than 16
threads are still considered not recommended. (libavcodec prints a
warning.)
2015-07-23 17:17:26 +02:00
wm4 5b47836082 manpage: fix typo 2015-07-23 17:13:37 +02:00
wm4 55879a8c0f cache: make backbuffer size configurable
Allow setting an arbitrary amount, instead of the fixed 50%.

This is nto striclty backwards compatible. The defaults don't change,
but the --cache/--cache-default options now set the readahead portion.
So in practice, users who configured this until now will see the
double amount of cache being used, _plus_ the 75MB default backbuffer
will be in use.
2015-07-22 23:55:10 +02:00
Niklas Haas 6f7d04be21 vo_opengl: add temporal-dither-period option
This was requested multiple times by users, and it's not hard to
implement and/or maintain.
2015-07-20 19:32:58 +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 050c529e9a screenshot: don't write PNG colorspace tags by default
Generates too much discussion and confusion.

Fixes #2051.
2015-07-18 18:33:54 +02:00
wm4 57043d9269 sub: add option for stretching image subtitles to screen
Probably makes users happy who want bitmap subtitles to show up in the
screen margins, and stops them from doing idiotic crap with vf_expand.

Fixes #2098.
2015-07-18 14:36:17 +02:00
wm4 905d5efded manpage: fix typo
The (...) was closed, but never opened.
2015-07-13 23:52:48 +02:00
wm4 57efe9089c player: extend --hls-bitrate option
Fixes #2116.
2015-07-13 13:34:58 +02:00
Philip Sequeira 4a4f788a68 player: use exit code 0 by default for quit, 4 for signals, etc.
Default key bindings in encoding mode also use code 4, because scripts
will probably want to fail if encoding is aborted (leaving an
incomplete file).
2015-07-11 23:46:49 +02:00
Niklas Haas 3007250824
vo_opengl: reimplement tscale=oversample
Closes #2102.
2015-07-11 14:00:43 +02:00
Philip Langdale 4b0b9b515b vf_vdpaurb: Add a new filter for reading back vdpau decoded frames
Normally, vdpau decoded frames are passed directly to a suitable
vo (vo_vdpau or vo_opengl) without ever touching system memory. This
is efficient for output purposes, but prevents any of the regular
filters from being used with such frames.

This new filter implements a read-back step to pull the frames back
into system memory where they can be acted on by other filters.
Eventually the frames will be sent to the vo as if they were normal
software-decoded frames.

Note that a vdpau compatible vo must still be used to ensure that
the decoder is properly initialised.

Signed-off-by: wm4 <wm4@nowhere>
2015-07-11 10:44:34 +02:00
wm4 8e82a64f56 player: parse and expose m3u playlist titles
Requested. Closes #2100.
2015-07-10 21:22:35 +02:00
wm4 59b64ceb79 video: add a way to disable automatic stereo conversion
Fixes #2111.
2015-07-10 18:04:34 +02:00
wm4 f3d06e3e91 demux_mkv: improve video duration detection heuristic
Extend the --demuxer-mkv-probe-video-duration behavior to work with
files that are partial and are missing an index. Do this by finding a
cluster 10MB before the end of the file, and if that fails, just read
the entire file. This is actually pretty trivial to do and requires only
5 lines of code.

Also add a mode that always reads the entire file to estimate the video
duration.
2015-07-09 22:47:41 +02:00
wm4 d23d9dc394 stream_file: add fd:// protocol 2015-07-09 15:51:31 +02:00
wm4 23220db924 player: disable seeking even if the cache is enabled
Until now, if a stream wasn't seekable, but the stream cache was enabled
(--cache), we've enabled seeking anyway. The idea was that at least
short seeks would typically fall within the cache. And if not, the user
was out of luck and terrible things happened. In other words, it was
unreliable.

Be stricter about it and remove this behavior. Effectively, this will
for example disable seeking in piped data.

Instead of trying to be clever, add an --force-seekable option, which
will always enable seeking if the user really wants it.
2015-07-08 22:04:35 +02:00
wm4 ef7278b4fd vf_vdpaupp: don't attempt to deinterlace progressive frames 2015-07-08 15:14:38 +02:00
wm4 4781f9e69a vf_vavpp: don't attempt to deinterlace progressive frames 2015-07-08 14:48:11 +02:00
wm4 0ebf5979d1 command: make deinterlace property use interlaced-only yadif mode 2015-07-07 15:19:40 +02:00
wm4 25755f5fe7 vf_yadif: expose interlaced frame mode
Also remove the enabled suboption, which did nothing. (It was probably
broken at some point.)
2015-07-07 15:18:56 +02:00
wm4 92727e7332 vo_opengl_cb, vo_opengl: add option for preloading hwdec context
See manpage additions. This is mainly useful for vo_opengl_cb, but can
also be applied to vo_opengl.

On a side note, gl_hwdec_load_api() should stop using a name string, and
instead always use the IDs. This should be cleaned up another time.
2015-07-07 15:05:32 +02:00
Preston Hunt 029da5abce ipc: add request_id to json
If the request contains a "request_id", copy it back into the
response. There is no interpretation of the request_id value by mpv; the
only purpose is to make it easier on the requester by providing an
ability to match up responses with requests.

Because the IPC mechanism sends events continously, it's possible for
the response to a request to arrive several events after the request was
made. This can make it very difficult on the requester to determine
which response goes to which request.
2015-07-03 22:26:54 +02:00
wm4 ed44f21289 manpage: fix dwmflush parameter 2015-07-03 19:40:15 +02:00
wm4 514af9fbd1 ao_coreaudio: add exclusive suboption 2015-07-03 19:28:00 +02:00