1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-09 00:17:07 +00:00

cache: lower default size to 2*10MB

Reduce it from 75MB in both directions (forward/backwards) to 10MB each.

The stream cache is kind of becoming useless in favor of the demuxer
cache. Using both doesn't make much sense, because they will contain
duplicated data for no reason.

Still leave it at 10MB, which may help with mp4 a bit. libavformat's mp4
demuxer tends to seek too much, so we try to avoid triggering network
level seeks by having some caching in the stream layer.
This commit is contained in:
wm4 2017-12-17 21:42:26 +01:00 committed by Stefano Pigozzi
parent 382a8ac0b0
commit a23a98f648
2 changed files with 4 additions and 4 deletions

View File

@ -3756,7 +3756,7 @@ Cache
between readahead and backbuffer sizes.
``--cache-default=<kBytes|no>``
Set the size of the cache in kilobytes (default: 75000 KB). Using ``no``
Set the size of the cache in kilobytes (default: 10000 KB). Using ``no``
will not automatically enable the cache e.g. when playing from a network
stream. Note that using ``--cache`` will always override this option.
@ -3777,7 +3777,7 @@ Cache
This option allows control over this.
``--cache-backbuffer=<kBytes>``
Size of the cache back buffer (default: 75000 KB). This will add to the total
Size of the cache back buffer (default: 10000 KB). This will add to the total
cache size, and reserved the amount for seeking back. The reserved amount
will not be used for readahead, and instead preserves already read data to
enable fast seeking back.

View File

@ -79,10 +79,10 @@ const struct m_sub_options stream_cache_conf = {
.size = sizeof(struct mp_cache_opts),
.defaults = &(const struct mp_cache_opts){
.size = -1,
.def_size = 75000,
.def_size = 10000,
.initial = 0,
.seek_min = 500,
.back_buffer = 75000,
.back_buffer = 10000,
.file_max = 1024 * 1024,
},
};