Replies: 5 comments 9 replies
-
@sevans466 Can you provide Flyleaf and FFmpeg versions? You could also try to use ffplay / ffmpeg directly to ensure that is not an FFmpeg issue? Next thing would be to disable audio (if any) to see if the leak comes from video or audio. A partial trace log might help. |
Beta Was this translation helpful? Give feedback.
-
Hello, we got distracted by other factors, but I now have a small WPF test app with 9 image views of the same camera (I have not written/edited code in a long while!). The mem profile is below: The trend is for the memory of the process to rise slowly for 90 seconds then climb more steeply - heading into several GB very quickly. This is the HikVision stream config: Changing Flyleaf settings and stream settings does help/change the numbers a bit....but the key problem remains present. I do see it with only 4 cams, 9 is just quicker and more representative of our use cases. We must be doing something very wrong to consume such a vast amount of memory - any thoughts welcome. Below is the new objects we see during the rapid growth in unmanaged memory: |
Beta Was this translation helpful? Give feedback.
-
I've encountered a similar growth before and it had to do with the app using integrated graphics rather than the GPU. This was on a laptop so it was a default power saving thing. |
Beta Was this translation helpful? Give feedback.
-
Guys, if you don't provide me enough information so I can reproduce it I can't really help. I'm not even sure if that an Audio or Video leak, if Video Acceleration has to do with that, if that's related with the OS/FFmpeg libs/GPU. |
Beta Was this translation helpful? Give feedback.
-
Sorry we're being slow, there's a major presentation going on tomorrow, and minds are a bit distracted. The setup throughout was 8 video streams, running near live (~500ms latency), no audio, at 1920 x 1080. As you can see for the first part it ran sweetly, with a little bump where I added a full screen (9th) view of one of the cameras, then closed that view. 18 minutes in, all the hosts and players were recycled, and replaced with what should be an identical set, viewing the same cameras, however memory use was completely different. I recycled the set 4 more times, with similar results. The flattening off on 3 of the peaks occurred where I opened a full screen view (???!), but I have no idea why that might reduce the problem. The thought that it might be GPU related is a good one, as this problem is more severe on HP ZBooks than it is on relatively low cost NUCs though the graphics seem to be similar. I've hunted through the demuxer, decoder and rendering code for any apparent bottlenecks, but cannot find anything of interest, suggesting that it's in the FFmpeg library. If you can provide any further pointers, or suggest ways in which this might occur, I would be most happy to hear them |
Beta Was this translation helpful? Give feedback.
-
Hello, We have been using Flyleaf for a year or so for Hikvision cameras (RTSP) - and this works well for us. We have recently started using it for Avigilon streams (from Avigilon AAC) which works, but seems to:
(a) Consume a lot of memory (not so surprising given resolutions) and
(b) That memory leaks and continues to climb - either slowly or more rapidly over time to prohibitive levels (climbing from 1 or 2GB for a 4 cam display to maybe 15 or 20GB over a 24 hour period!
Below is an image from DotMemory:
This was done with 4 cams - 1 is 4K res (MPeg4) and 3 are 2500x1500 (mpeg-h)
Has anyone seen memory leaks like this and if so are there any diagnostics (or solutions?) we should turn to? It is key for us that the application is stable over time.
We have done a lot of experiments, and the unmanaged memory seems to grow at different rates - but always growing.
Any council is welcome.
Our settings are below:
var config = new Config();
config.Player.Stats = false;
config.Player.MaxLatency = TimeSpan.FromMilliseconds(maxLatency).Ticks;
config.Video.AspectRatio = isFillSpace ? AspectRatio.Fill : AspectRatio.Keep;
config.Decoder.LowDelay = true;
config.Demuxer.FormatOpt["reconnect_delay_max"] = "7";
config.Demuxer.AllowTimeouts = true;
// Attempt to rein in the huge memory use
//config.Demuxer.BufferDuration = TimeSpan.FromMilliseconds(500).Ticks;
//config.Player.MinBufferDuration = 0;
//-----------------------------------------------------------------
// Player - for this FlyleafHost
result = new Player(config);
Beta Was this translation helpful? Give feedback.
All reactions