r/homeassistant icon

Go to homeassistant

I'm struggling to understand the Frigate/go2rtc setup.

Archived post. New comments cannot be posted and votes cannot be cast.

Thumbnail image: Always come home to a well-lit house with Caséta smart lighting controls. Schedule lights that turn on at sunset and off at sunrise, automatically adjusting as the seasons change. Ensure that you and your loved ones don’t have to come back to a dark home!

Here's my Frigate config. There are a few things specific for Reolink cameras, but the layout should help. The cameras are first added to go2rtc, and the cameras section pulls the feed from there into Frigate (and Home Assistant)

mqtt:
  enabled: False

ffmpeg:
  hwaccel_args: preset-nvidia-h264
  input_args: -avoid_negative_ts make_zero -fflags +genpts+discardcorrupt -flags low_delay -strict experimental -analyzeduration 1000M -probesize 1000M -rw_timeout 5000000

go2rtc:
    streams:
        front_camera: http://192.168.1.253/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=admin&password=[redacted]
        back_camera: http://192.168.1.254/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=admin&password=[redacted]
    webrtc:
      candidates:
        - 192.168.1.24:8555
        - stun:8555
      
cameras:
  front_camera:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/front_camera
          input_args: preset-rtsp-restream
  back_camera:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/back_camera
          input_args: preset-rtsp-restream

That was sorta part of my question too. What are all those URL args for and are they explained somewhere?

More replies

What Reolink cameras are you using? I'm having so much trouble with the 510A which I unfortunately have 5 of. Are you able to maintain a constant, error free log with this setup?

More replies More replies

https://docs.frigate.video/guides/configuring_go2rtc

https://docs.frigate.video/configuration/restream

Those are the relevant documentation bits.

Long story short you configure your camera under go2rtc: and when you do the configuration for recording/detection you use the restream address (rtsp://<server_ip>:8554/<camera_name> instead of the cameras native rtsp address.

But you need to set it up under the go2rtc: section first, otherwise the restream address doesn’t exist.

Note: you really should consider running detect on your cameras substream. Doing it on a full 4k or whatever frame is hell on CPU usage.

I have a Coral. Doesn't it use that to detect? If so, I don't think I should care, should I?

And if I setup go2rtc to restream, will the HA integration automatically use that and not the original stream?

More replies More replies

following as I too can't figure out how to convert over to it lol.

is restream ip addres the same for all ??

path: rtsp://127.0.0.1:8554/_camera nam_