either a ffmpeg bug introduced in a recent version of ffmpeg
or a change in the ffmpeg API that we haven’t integrated into Gladys
or a change in Node 18 in the handling of child processes
We need to investigate; I haven’t had time on my side yet, I’d welcome help on the topic
Edit: For info we use this lib in Gladys:
After seeing all the reported issues (295 issues), and the fact that the lib is no longer really maintained, for what it does we’d be better off just launching ffmpeg ourselves via a Node child process so we can close it properly
That was originally a feature (and not a bug)
The idea is to always have a fresh image in memory so that if you open the dashboard, you immediately have a fresh image served from memory, and you don’t have to wait for a new image to be fetched.
Which is in itself a good idea, but the CPU impact is quite high. I can’t imagine if you connect 5 cameras or more to Gladys.
On my machine (mini-PC) I went from an average of 6% to 50% or even 70% (image every 10 seconds).
To save on performance, Gladys could update in the background, but only once a minute as long as no dashboard is loaded?
Anyway, that’s a minor detail here, given the other, much more important bug!
That’s the purpose of this setting « 1 minute/30 seconds/10 seconds » etc.. originally
There you are using this setting to create a fake semblance of live on the dashboard, but it’s too resource-hungry because it’s not really made for that ^^
For live updates on the dashboard, I agree it’s a nice enhancement to add and to develop properly
I’m picking up this topic that had been forgotten; there wasn’t a GitHub issue
I worked this morning on replacing the ffmpeg-fluent library, which is clearly outdated and is the likely cause of this memory leak.
I’m replacing it with a simple child_process which will then be released from memory once the camera image is retrieved.
The PR is here:
Sorry again for the delay, please don’t hesitate to nudge me on topics like this if there’s no activity, and above all remember to create a GitHub issue (GitHub · Where software is built), it’s the « TODO list » of bugs to fix for the project
And if the image is never retrieved, what happens?
From what I remember it was another cause of my problem — a memory leak when the camera is no longer available.