I have been trying to set up go2rtc in frigate, from my understanding if I set this up it will be more lightweight on my system for viewing live feeds?
Currently if I click frigate in the sidebar in HA I can see a live stream on the frigate dashboard. I have 1 out of 6 cameras set up and it’s working for detection with some recording. It works pretty well but at night time it can’t detect when cars come up my driveway as the headlights are pointed at the camera so I’d like to enable another camera from a different view that will detect the car. The camera currently uses 50% of my CPU so I’m hoping it will be a lot less if I use go2rtc? Maybe I have this wrong. Either way I don’t think I should add the next camera as it might max out my CPU. My understanding is that if I can get all 6 cameras into frigate with go2rtc then I can use the restreams on lovelace cards which should be low latency and not so much of a burden on cpu.
Anyway, I’ve tried following the documentation as best I can and got to the point where I realized I’m just fumbling away trying random things hoping for it to work which is not ideal. Here’s what I’ve tried with my frigate.yaml:
mqtt:
host: 10.0.0.5
user: ********
password: ********
go2rtc:
streams:
driveway:
- rtsp://user:[email protected]:554/ip3/1
cameras:
driveway:
ffmpeg:
inputs:
#lowres detection
- path: rtsp://user:[email protected]:8554/driveway
input_args: preset-rtsp-restream
roles:
- detect
#hires recording
- path: rtsp://user:[email protected]:554/ip3/0
roles:
- record
detect:
width: 1280
height: 720
fps: 5
objects:
track:
- person
- car
- cow
record:
enabled: True
retain:
days: 30
mode: motion
snapshots:
enabled: True
motion:
mask:
- 0,0,701,0,443,244,0,452
- 1280,0,1280,249,1179,196,897,240,729,0
database:
path: /config/frigate.db
I’ve also tried putting ffmpeg: in front of rtsp:// under go2rtc and doesn’t seem to do anything. I cannot access the stream in VLC if I enter rtsp://user:[email protected]:8554/driveway.
Logs:
2023-08-20 02:11:12.517146487 [2023-08-20 14:11:12] frigate.video ERROR : driveway: Unable to read frames from ffmpeg process.
2023-08-20 02:11:12.524972947 [2023-08-20 14:11:12] frigate.video ERROR : driveway: ffmpeg process is not running. exiting capture thread...
2023-08-20 02:11:32.547724787 [2023-08-20 14:11:32] watchdog.driveway ERROR : Ffmpeg process crashed unexpectedly for driveway.
2023-08-20 02:11:32.548284616 [2023-08-20 14:11:32] watchdog.driveway ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2023-08-20 02:11:32.549602693 [2023-08-20 14:11:32] ffmpeg.driveway.detect ERROR : [tcp @ 0x564c6c4bce40] Connection to tcp://10.0.0.34:8554?timeout=5000000 failed: Connection refused
2023-08-20 02:11:32.549619156 [2023-08-20 14:11:32] ffmpeg.driveway.detect ERROR : rtsp://*:*@10.0.0.34:8554/driveway: Connection refused
If I go to frigate dashboard the camera feed is black and says no frames have been received, check error logs. If I click into the camera feed and then go to the drop down in the top and select webrtc it shows up. I can also go to frigate at 10.0.0.5:5000 (doesn’t work if I use go2rtc dashboard button in HA frigate) and click onto the go2rtc dashboard and the camera is listed there but under the online section it says 0 / info, if I click it it shows:
{
“producers”: [
{
“url”: “rtsp://admin:[email protected]:554/ip3/1”
}
],
“consumers”: null
}
The frigate code that I revert back to has the go2rtc part deleted and this part altered which is how I have it working when I’m not trying to figure out go2rtc.
cameras:
driveway:
ffmpeg:
inputs:
#lowres detection
- path: - rtsp://user:[email protected]:554/ip3/1
roles:
- detect
Addon configuration:
I also have 6 cameras set up like this in my HA config.yaml they are the 4k streams. I’m not sure if this is needed when using frigate, I set this up just before I installed frigate. I don’t currently have any camera feeds displaying in lovelace as I’m worried about the cpu usage.
camera 1:
- platform: ffmpeg
name: Camera 1
input: rtsp://user:[email protected]:554/ip1/0
Apologies for the long post but just trying to give as much info for someone who knows what they are looking at, hopefully someone can give me some tips on camera setups to optimize my system.
Additional info:
- HAOS running on Intel NUC6CAYH (no hardware acceleration)
- Cameras are used in an out of the box NVR setup independent of HA, my main goal is to pull feeds into HA for dashboards and notifications etc. Don’t really need recording set up at the end of the day, but I do have the one camera in frigate recording to my NAS currently