求设置mpv-media-player的缓存体积

Totem,mplayer,sopcast,realplayer,bmp
回复
yubinalice
帖子: 197
注册时间: 2015-12-23 16:20
系统: ubuntu 16.04

求设置mpv-media-player的缓存体积

#1

帖子 yubinalice » 2022-09-22 20:57

如题,

默认情况下,是缓存150MB的资料在内存里面,然而,现在一般都是大内存,想设置成1GB的,

然后,有啥方法让cache-on-disk的缓存也是类似的1GB文件循环写入,而不是一直写下去,比如,磁盘20GB的,80GB的文件,缓存到20GB的时候就无法继续写了,

1GB大小写完后面删除前面循环写入有办法??

以前有办法篡改缓存大小,但是0.34版本的时候貌似找不到这个选项了。
头像
astolia
论坛版主
帖子: 6454
注册时间: 2008-09-18 13:11

Re: 求设置mpv-media-player的缓存体积

#2

帖子 astolia » 2022-09-23 10:39

你是不是不会英文?manpage里写得明明白白

代码: 全选

       --cache=<yes|no|auto>
              Decide whether to use network cache settings (default: auto).

              If enabled, use up to --cache-secs for the cache size (but still limited to --demuxer-max-bytes), and make the cached data seekable (if possible).  If disabled, --cache-pause and related are implicitly disabled.

              The auto choice enables this depending on whether the stream is thought to involve network accesses or other slow media (this is an imperfect heuristic).

              Before mpv 0.30.0, this used to accept a number, which specified the size of the cache in kilobytes. Use e.g. --cache --demuxer-max-bytes=123k instead.
yubinalice
帖子: 197
注册时间: 2015-12-23 16:20
系统: ubuntu 16.04

Re: 求设置mpv-media-player的缓存体积

#3

帖子 yubinalice » 2022-09-24 1:13

astolia 写了: 2022-09-23 10:39 你是不是不会英文?manpage里写得明明白白

代码: 全选

       --cache=<yes|no|auto>
              Decide whether to use network cache settings (default: auto).

              If enabled, use up to --cache-secs for the cache size (but still limited to --demuxer-max-bytes), and make the cached data seekable (if possible).  If disabled, --cache-pause and related are implicitly disabled.

              The auto choice enables this depending on whether the stream is thought to involve network accesses or other slow media (this is an imperfect heuristic).

              Before mpv 0.30.0, this used to accept a number, which specified the size of the cache in kilobytes. Use e.g. --cache --demuxer-max-bytes=123k instead.
我是使用mpv --list-options|grep cache看完了,就没去找manpage,自然不知道。

然而,话说SSD,150MB的写入速度,400MB的读取速度,用来做缓存设备,结果看视频却卡顿是咋回事?

不加这个cache-on-disk就没事。缓存到内存就能正常播放。

这个是啥原理?那么啥速度的设备当成缓存能够正常播放?

然后,有啥办法,让他吧disk当成循环写入的设备?1GB文件,写完后面删除前面?

这个貌似manpage里面也没有。
回复