diff options
author | wm4 <wm4@nowhere> | 2015-08-05 23:41:29 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-08-05 23:41:29 +0200 |
commit | beb4f8316aca2f206ce1ea743498b4241670c37d (patch) | |
tree | da40098d6ea48641c6e3cf375971e2a66488984b /DOCS | |
parent | 775d81609627e4c6e091ae3761cdb1235f789276 (diff) | |
download | mpv-beb4f8316aca2f206ce1ea743498b4241670c37d.tar.bz2 mpv-beb4f8316aca2f206ce1ea743498b4241670c37d.tar.xz |
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.
Diffstat (limited to 'DOCS')
-rw-r--r-- | DOCS/interface-changes.rst | 2 | ||||
-rw-r--r-- | DOCS/man/options.rst | 14 |
2 files changed, 16 insertions, 0 deletions
diff --git a/DOCS/interface-changes.rst b/DOCS/interface-changes.rst index 9eb3de3048..d2f186d6d7 100644 --- a/DOCS/interface-changes.rst +++ b/DOCS/interface-changes.rst @@ -21,6 +21,8 @@ Interface changes --- mpv 0.10.0 will be released --- - remove --demuxer-readahead-packets and --demuxer-readahead-bytes + add --demuxer-max-packets and --demuxer-max-bytes + (the new options are not replacement and have very different semantics) - change "video-aspect" property: always settable, even if no video is running; always return the override - if no override is set, return the video's aspect ratio diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index f86e489db1..b5587ccfe6 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -2229,6 +2229,20 @@ Demuxer ``--demuxer-rawvideo-size=<value>`` Frame size in bytes when using ``--demuxer=rawvideo``. +``--demuxer-max-packets=<packets>``, ``--demuxer-max-bytes=<bytes>`` + This controls how much the demuxer is allowed to buffer ahead. The demuxer + will normally try to read ahead as much as necessary, or as much is + requested with ``--demuxer-readahead-secs``. The ``--demuxer-max-...`` + options can be used to restrict the maximum readahead. This limits excessive + readahead in case of broken files or desynced playback. The demuxer will + stop reading additional packets as soon as one of the limits is reached. + (The limits still can be slightly overstepped due to technical reasons.) + + Set these limits highher if you get a packet queue overflow warning, and + you think normal playback would be possible with a larger packet queue. + + See ``--list-options`` for defaults and value range. + ``--demuxer-thread=<yes|no>`` Run the demuxer in a separate thread, and let it prefetch a certain amount of packets (default: yes). Having this enabled may lead to smoother |