diff options
author | wm4 <wm4@nowhere> | 2014-08-16 17:07:36 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-08-16 17:10:08 +0200 |
commit | b822faa6cfdae2c530d68f257a811c6184d237a6 (patch) | |
tree | 073cee68af958d205b00648cfacc4439b6d5d471 /DOCS | |
parent | e6e3bc7cd97e7dc27d91bbf89902191b4408cb40 (diff) | |
download | mpv-b822faa6cfdae2c530d68f257a811c6184d237a6.tar.bz2 mpv-b822faa6cfdae2c530d68f257a811c6184d237a6.tar.xz |
demux: add option to control the readahead buffer by a duration value
--demuxer-readahead-secs now controls how much the demuxer should
readahead by an amount of seconds. This is based on the raw packet
timestamps. It's not always very exact. For example, h264 in Matroska
does not store any linear timestamps (only PTS values which are going
to be reordered by the decoder), so this heuristic is usually off by
several hundred milliseconds.
The decision whether to readahead is basically OR-ed with the other
--demuxer-readahead-packets options. Change the manpage descriptions
to subtly convey these semantics.
Diffstat (limited to 'DOCS')
-rw-r--r-- | DOCS/man/options.rst | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index 9320a244ac..edbbc35419 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -2048,11 +2048,21 @@ Demuxer Run the demuxer in a separate thread, and let it prefetch a certain amount of packets (default: no). +``--demuxer-readahead-secs=N`` + If ``--demuxer-thread`` is enabled, this controls how much the demuxer + should buffer ahead in seconds (default: 0.2). As long as no packet has + a timestamp difference higher than the readahead amount relative to the + last packet returned to the decoder, the demuxer keeps reading. + + (This value tends to be fuzzy, because many file formats don't store linear + timestamps.) + ``--demuxer-readahead-packets=N`` If ``--demuxer-thread`` is enabled, this controls how much the demuxer - should buffer ahead. If the number of packets in the packet queue exceeds - ``--demuxer-readahead-packets``, or the total number of bytes exceeds - ``--demuxer-readahead-bytes``, the thread stops reading ahead. + should buffer ahead. As long as the number of packets in the packet queue + doesn't exceed ``--demuxer-readahead-packets``, and the total number of + bytes doesn't exceed ``--demuxer-readahead-bytes``, the thread keeps + reading ahead. Note that if you set these options near the maximum, you might get a packet queue overflow warning. |