diff options
Diffstat (limited to 'DOCS/man')
-rw-r--r-- | DOCS/man/input.rst | 5 | ||||
-rw-r--r-- | DOCS/man/options.rst | 46 |
2 files changed, 51 insertions, 0 deletions
diff --git a/DOCS/man/input.rst b/DOCS/man/input.rst index 814d7a6825..9049bf8c9d 100644 --- a/DOCS/man/input.rst +++ b/DOCS/man/input.rst @@ -1462,6 +1462,10 @@ Property list (may not account correctly for various overhead), and stops at the demuxer position (it ignores seek ranges after it). + ``file-cache-bytes`` is the number of bytes stored in the file cache. This + includes all overhead, and possibly unused data (like pruned data). This + member is missing if the file cache is not active. + When querying the property with the client API using ``MPV_FORMAT_NODE``, or with Lua ``mp.get_property_native``, this will return a mpv_node with the following contents: @@ -1476,6 +1480,7 @@ Property list "bof-cached" MPV_FORMAT_FLAG "eof-cached" MPV_FORMAT_FLAG "fw-bytes" MPV_FORMAT_INT64 + "file-cache-bytes" MPV_FORMAT_INT64 Other fields (might be changed or removed in the future): diff --git a/DOCS/man/options.rst b/DOCS/man/options.rst index ba9bac7e63..c70b26aa2c 100644 --- a/DOCS/man/options.rst +++ b/DOCS/man/options.rst @@ -3958,6 +3958,33 @@ Cache very high, so the actually achieved readahead will usually be limited by the value of the ``--demuxer-max-bytes`` option. +``--cache-on-disk=<yes|no>`` + Write packet data to a temporary file, instead of keeping them in memory. + This makes sense only with ``--cache``. If the normal cache is disabled, + this option is ignored. + + You need to set ``--cache-dir`` to use this. + + The cache file is append-only. Even if the player appears to prune data, the + file space freed by it is not reused. The cache file is deleted when + playback is closed. + + Note that packet metadata is still kept in memory. ``--demuxer-max-bytes`` + and related options are applied to metadata *only*. The size of this + metadata varies, but 50 MB per hour of media is typical. The cache + statistics will report this metadats size, instead of the size of the cache + file. If the metadata hits the size limits, the metadata is pruned (but not + the cache file). + + When the media is closed, the cache file is deleted. A cache file is + generally worthless after the media is closed, and it's hard to retrieve + any media data from it (it's not supported by design). + +``--cache-dir=<path>`` + Directory where to create temporary files (default: none). + + Currently, this is used for ``--cache-on-disk`` only. + ``--cache-pause=<yes|no>`` Whether the player should automatically pause when the cache runs out of data and stalls decoding/playback (default: yes). If enabled, it will @@ -3986,6 +4013,25 @@ Cache This option also triggers when playback is restarted after seeking. +``--cache-unlink-files=<immediate|whendone|no>`` + Whether or when to unlink cache files (default: immediate). This affects + cache files which are inherently temporary, and which make no sense to + remain on disk after the player terminates. This is a debugging option. + + ``immediate`` + Unlink cache file after they were created. The cache files won't be + visible anymore, even though they're in use. This ensures they are + guaranteed to be removed from disk when the player terminates, even if + it crashes. + + ``whendone`` + Delete cache files after they are closed. + + ``no`` + Don't delete cache files. They will consume disk space without having a + use. + + Currently, this is used for ``--cache-on-disk`` only. Network ------- |