mainsail-crew/crowsnest

WebRTC (camera-streamer) format balloons in CPU utilization over time

austinrdennis opened this issue · 1 comments

What happened

When using webRTC (camera-streamer) on my RPi 4b, the CPU usage is usually under 20% on a single core. After running for around 8+ hours (specifics are hard to pin down, I'm not gonna watch it continuously for that long), it gallons to consuming 95% or more of a single core's compute time. The stream also starts to experience dropped frames and heavy bitrate artifacting (ghosting and incorrect colors).

What did you expect to happen

CPU usage remains consistent over time. Stream remains stable without artifacts or dropped frames.

How to reproduce

All I have to do is let the stream run for enough time. The printer can be idle the entire time.

Additional information

Restarting the crows nest service via sudo systemctl restart crowsnest.service fixes the problem and "resets the timer" so to speak.

I haven't done much testing with other formats aside from MJPEG adaptive and that runs without this issue. Let me know if you want me to play around with other formats.

The logs are squeaky clean, but I'll throw my latest one up here anyway for completeness:crowsnest.log

I'm using the latest version of crows nest and camera-streamer at the time of writing this.

Crowsnest ist just a wrapper for multiple backends. If you detect a bug in camera-streamer, pls report it to camera-streamer itself.

PS: you also mixed up different things... backend settings and client settings. "WebRTC (camera-streamer)" and "MJPEG adaptive" are just client settings..