Go2rtc using 99% cpu in HA

After noticing a slight bump in power consumption from my homelab and cpu usage, I was able to narrow it down to home assistant constantly running at 99-100% cpu usage. Restarting HA will “fix it”. I cannot correlate the spike in CPU usage to any action on my side.

This started happening after I upgraded to 2024.11. Apparently go2rtc seems to be the culprit which maybe has to do with the new webrtc features on this version?

Anyone having the same experience?

I have go2rtc in frigate. None in hass.

I run frigate separately from HA on a docker container. But I think maybe this is being caused by the frigate card on the dashboard.

I was having a similar issue every time I viewed the cameras through the iOS app. CPU would max out and not go down until HA was restarted.

I run UniFi cameras. What seems to have fixed it for me is changing my camera settings from “Enhanced” encoding (H.265) to “Standard” encoding (H.264).

It’s better to create issue in the go2rtc github project.
It’s important to understand which camera created the problem.
It’s probably some kind of RTSP stream. But there may be other options.

1 Like

I’m having the same issue with go2rtc. Pegging my CPU. It incrementally grows over time, in steps, and then pegs things out. I’m using Unifi Protect cameras with a Picture Glance card, but restarting Unifi Protect doesn’t solve the CPU problem. Only a reboot of Home Assistant. However, a reboot of Home Assistant is only VERY temporary as within 12 hours or less it spikes again. Using Glances it shows that go2rtc is the main culprite with 200%+ CPU usage. Any ideas on a resolution here? Posted the same thing to a thread on Reddit about a user having the same issue.