Open liuchuancong opened 1 month ago
I I'm running 16 RTSP Streams and ram usage go up pretty quick to around 2900 MB in only 15 minutes. Note : 16 Player instances alone without any media is already 700-800MB of memory
The cache should be default be limited to 32MB but i don't think this is actually being applied. After seeing you use setProperty i investigated the function and read all available mpv options and applied theses options.
Player ply = Player();
(ply.platform as dynamic).setProperty('cache', 'no'); // --cache=<yes|no|auto>
(ply.platform as dynamic).setProperty('cache-secs', '0'); // --cache-secs=<seconds> with cache but why not.
(ply.platform as dynamic).setProperty('demuxer-seekable-cache', 'no'); // --demuxer-seekable-cache=<yes|no|auto> Redundant with cache but why not.
(ply.platform as dynamic).setProperty('demuxer-max-back-bytes', '0'); // --demuxer-max-back-bytes=<bytesize>
(ply.platform as dynamic).setProperty('demuxer-donate-buffer', 'no'); // --demuxer-donate-buffer==<yes|no>
Now it's stable and won't go over 1,688 MB after hours of running it
All my memory usage numbers are in Debug mode
@justbendev Thanks for the recovery, I'll try to see if the problem recurs, you're my hero!
This problem still exists,increase 30M every 10 minutes when playing m3u8 media files
I run the profile, its actually leaks, I just open and close video again 8 times, and see some component inVideoTexture
class is not disposed.
It looks like these two properties are not being disposed at the dispose()
method.
After playing the video for an hour in Windows, the content soared from 300MB to 1G. The non-caching attribute has been set. Is this a memory leak in the player?
Here is my simple code :