-
Notifications
You must be signed in to change notification settings - Fork 720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to stream video II: memory leaks #1091
Comments
More tests:
Seems a performance issue. CPU fan goes max with the third browser tab and frames start to interleave irregularly. I would naively say that the process of the next frame would start before the process of the current frame is finished, that's why some frames are lost and memory occupation keeps growing. I'm probably talking crap, since I don't know too much about video. |
Looks like this is an issue of pyav. |
How-to-reproduce: https://gist.github.com/rodolfoap/20411acc86ecca39d18ebfc2060bb8c5. Issue remains using either av==11.0.0 (installed by default) or av==12.0.0 (last version). The Dockerfile allows changing the |
Using the webcam example, I can stream a single RTSP video from a server, to multiple clients in browsers:
But I have a problem: a memory leak, which is quite aggressive. With my gaming PC (32Gb RAM, Intel Core i7, Nvidia RTX 2080 with Debian 12), memory leak starts with a 1920x1080 video and only THREE browser windows. Twenty seconds is enough to reach 1Gb, from an initial 500Mb.
User @ZoroLH (thanks!) already observed this behavior (see #1089 (comment)).
Just in case, my code is here. What can I do to address such memory leak?
The text was updated successfully, but these errors were encountered: