When I add an appsrc overlay, the RAM usage increases exponentially and keeps growing until the system eventually fails.
However, when I use only two appsrc sources (video and audio), the RAM usage remains stable. I observed the same issue when using imagefreeze, which led me to test with an appsrc instead.
Do you have any insights as to what might be causing this behavior? Additionally, I’ve noticed that whenever I add a queue (regardless of its position in the pipeline), the video framerate drops to 47 FPS instead of 60, even when using videorate.
I investigated the issue, and it turns out that this happens on a machine where the processor’s memory is overloaded—or at least, that’s my assumption. I’m not entirely sure how the imagefreeze plugin behaves, but from what I understand, the CPU has to handle a 1280x720 RGBA image and convert it for the encoder. That’s a significant amount of data to process while maintaining 60 FPS.
What I’ve noticed is that when I switch to 30 FPS, the issue disappears. This suggests that the CPU can’t process the data fast enough, causing it to spill into memory. However, since it never catches up, the backlog keeps growing indefinitely. I could limit buffer size and drop frames, but that causes the video to malfunction, eventually freezing.
I also noticed that when I add other video sources while requesting 60 FPS, the actual frame rate drops to 43 FPS. I assume GStreamer recognizes that the CPU can’t handle that much data and adjusts accordingly. When I set it to 30 FPS, everything runs smoothly—at least on this machine.
On a more powerful CPU, 60 FPS is achievable, which suggests that this particular processor isn’t fast enough to handle the data stream efficiently. The machine in question is an Athlon 5370 with 2MB of cache. Interestingly, if the image or video resolution is below 960x720, the CPU can maintain 60 FPS without issue.