Go2rtc fork with lots of Nest camera fixes

Because the official Nest integration still doesn’t support still images (black screens only until you click on them to load the full stream), I made a fork of go2rtc which fixes a ton of issues when bridging Nest camera streams to the RTSP streaming protocol spoken by the built-in Generic Camera integration.

The fork contains a bunch of good fixes which I sent upstream, but the maintainer of go2rtc seems to have been absent for a few months, so I forked the library and wanted to share them here for others.

Summary of the fixes:

  1. Streams no longer drop every 5 minutes (upstream PR #2493).
  2. Periodic keyframe support (upstream PR #2494).
  3. Automatically throttles to stay under Google’s rate limits: 10 executeCommand/min per project, 5/min per device and command, 30/min and 100/h per camera (upstream PR #2493).
  4. Cameras that are switched off fail fast (upstream PR #2493).
  5. No more corrupt keyframes on attach (upstream PR #2491; pion/rtp #370).
  6. Packet loss no longer produces smeared keyframes (part of upstream PR #2491).
  7. Greatly improved keyframe cache (GOP cache; #gop=1). Rebase of upstream PR #1887 by seydx.

Grab it here:

I’ve been trying to pull various PRs from the go2rtc repo to fix the Nest cam issues I’ve been experiencing. Immediately more stable with these changes. Thank you!

A quick message of thanks for these fixes. I’ve been trying, unsuccessfully, to integrate my Nest camera into Frigate via Go2RTC. The stream wasn’t stable and Frigate’s ffmpeg error messages were filling my logs. After building the fixes by @bhamilton, it appears to be rock solid.

Glad to help! Hopefully we can get those PRs merged upstream.

Any chance you can put the pre-built binaries on your Github fork? Currenly, I’ve forked your fork and put a workflow to build just for AMD64 which is what I need. But it would probably make more sense if you included them?