summaryrefslogtreecommitdiffstats
path: root/DOCS
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-10-21 19:26:33 +0200
committerwm4 <wm4@nowhere>2017-10-21 19:26:33 +0200
commit719a435d3636c7b848b49f06e6a2ea55e7ee656a (patch)
tree43a62dbeda4ee45ed53e67ebcb2cfe180f8fd8e2 /DOCS
parent83c9f169c411a60bc6e025ce4feb46742690dad3 (diff)
downloadmpv-719a435d3636c7b848b49f06e6a2ea55e7ee656a.tar.bz2
mpv-719a435d3636c7b848b49f06e6a2ea55e7ee656a.tar.xz
demux: add a back buffer and the ability to seek into it
This improves upon the previous commit, and partially rewrites it (and other code). It does: - disable the seeking within cache by default, and add an option to control it - mess with the buffer estimation reporting code, which will most likely lead to funny regressions even if the new features are not enabled - add a back buffer to the packet cache - enhance the seek code so you can seek into the back buffer - unnecessarily change a bunch of other stuff for no reason - fuck up everything and vomit ponies and rainbows This should actually be pretty usable. One thing we should add are some properties to report the proper buffer state. Then the OSC could show a nice buffer range. Also configuration of the buffers could be made simpler. Once this has been tested enough, it can be enabled by default, and might replace the stream cache's byte ringbuffer. In addition it may or may not be possible to keep other buffer ranges when seeking outside of the current range, but that would be much more complex.
Diffstat (limited to 'DOCS')
-rw-r--r--DOCS/interface-changes.rst1
-rw-r--r--DOCS/man/options.rst30
2 files changed, 26 insertions, 5 deletions
diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst
index 608248f88f..7ccf66758c 100644
--- a/DOCS/interface-changes.rst
+++ b/DOCS/interface-changes.rst
@@ -45,6 +45,7 @@ Interface changes
audio output drivers for quite a while (coreaudio used to provide it)
- deprecate --videotoolbox-format (use --hwdec-image-format, which affects
most other hwaccels)
+ - remove deprecated --demuxer-max-packets
--- mpv 0.27.0 ---
- drop previously deprecated --field-dominance option
- drop previously deprecated "osd" command
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst
index 8ff7ccd508..d6e7cf56cf 100644
--- a/DOCS/man/options.rst
+++ b/DOCS/man/options.rst
@@ -2839,11 +2839,31 @@ Demuxer
See ``--list-options`` for defaults and value range.
-``--demuxer-max-packets=<packets>``
- Quite similar ``--demuxer-max-bytes=<bytes>``. Deprecated, because the
- other option does basically the same job. Since mpv 0.25.0, the code
- tries to account for per-packet overhead, which is why this option becomes
- rather pointless.
+``--demuxer-max-back-bytes=<value>``
+ This controls how much past data the demuxer is allowed to preserve. This
+ is useful only if the ``--demuxer-seekable-cache`` option is enabled.
+ Unlike the forward cache, there is no control how many seconds are actually
+ cached - it will simply use as much memory this option allows. Setting this
+ option to 0 will strictly disable any back buffer.
+
+ Keep in mind that other buffers in the player (like decoders) will cause the
+ demuxer to cache "future" frames in the back buffer, which can skew the
+ impression about how much data the backbuffer contains.
+
+ See ``--list-options`` for defaults and value range.
+
+``--demuxer-seekable-cache=<yes|no>``
+ This controls whether seeking can use the demuxer cache (default: no). If
+ enabled, short seek offsets will not trigger a low level demuxer seek
+ (which means for example that slow network round trips or FFmpeg seek bugs
+ can be avoided). If a seek cannot happen within the cached range, a low
+ level seek will be triggered. Seeking outside of the cache will always
+ discard the full cache.
+
+ Keep in mind that some events can flush the cache or force a low level
+ seek anyway, such as switching tracks, or attmepting to seek before the
+ start or after the end of the file. This option is experimental - thus
+ disabled, and bugs are to be expected.
``--demuxer-thread=<yes|no>``
Run the demuxer in a separate thread, and let it prefetch a certain amount