Most noticeable on long youtube streams. With default settings mpv memory usage bloats to gigabyte+ very fast. Funniest thing is, my internet is fast enough, mpv works fine with disabled cache. No need to waste so much ram. Same happens on linux and windows.
mpv 0.28.2, archlinux x86-64, windows x64
mpv https://youtu.be/P21oZTbctZo
~ ps -C mpv -o comm,rss
COMMAND RSS
mpv 151964
~ ps -C mpv -o comm,rss
COMMAND RSS
mpv 1063172
No need to waste so much ram
Unused memory is wasted memory. But as far as your question goes, of course it's not (shouldn't be) unlimited. Unfortunately you ignored the template and it's impossible for me to reproduce your problem.
Memory consumed without need, profit and reason is wasted memory, stolen from other apps and system.
Memory consumed without need, profit and reason is wasted memory, stolen from other apps and system.
I agree.
From your log, what I noticed is that there are like 40,000 lines of matroska demuxing output. That seems highly suspect, and would be the first thing I'd investigate in order to figure out where these gigabytes of RAM went. @wm4 probably knows more about this.
That seems to be roughly 1 GB of cache. With the default settings and 2 streams that's an expected value. The default size was reduced in mpv git. the excessive Matroska logging is @haasn's fault, but was fixed in git master.
mpv works fine with disabled cache.
Then disable it, how much of an idiot are you?
I disabled cache when this behavior was introduced. That, however does not help other users. They pass something like --cache=1000, but that does not work.
Most helpful comment
Memory consumed without need, profit and reason is wasted memory, stolen from other apps and system.