Local realtime person detection for RTSP cameras

There is only one user logged in at a time.

I thought I will give it another go, with a bare minimum config.

mqtt:
  enabled: False

cameras:
  Eingang: # <------ Name the camera
    ffmpeg:
      inputs:
        - path: rtsp://USER:PASSWORD@IP:554/cam/realmonitor?channel=1&subtype=0 # <----- The stream you want to use for detection
          roles:
            - detect
    detect:
      enabled: False # <---- disable detection until you have a working camera feed
      width: 640 # <---- update for your camera's resolution
      height: 480 # <---- update for your camera's resolution
s6-rc: info: service s6rc-fdholder: starting
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service s6rc-fdholder successfully started
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service log-prepare: starting
s6-rc: info: service log-prepare successfully started
s6-rc: info: service nginx-log: starting
s6-rc: info: service go2rtc-log: starting
s6-rc: info: service frigate-log: starting
s6-rc: info: service nginx-log successfully started
s6-rc: info: service go2rtc-log successfully started
s6-rc: info: service go2rtc: starting
s6-rc: info: service frigate-log successfully started
s6-rc: info: service go2rtc successfully started
s6-rc: info: service go2rtc-healthcheck: starting
s6-rc: info: service frigate: starting
s6-rc: info: service go2rtc-healthcheck successfully started
s6-rc: info: service frigate successfully started
s6-rc: info: service nginx: starting
s6-rc: info: service nginx successfully started
s6-rc: info: service legacy-services: starting
2023-10-04 15:07:29.181820949  [INFO] Preparing go2rtc config...
2023-10-04 15:07:29.182304873  [INFO] Starting Frigate...
2023-10-04 15:07:29.183198890  [INFO] Starting NGINX...
s6-rc: info: service legacy-services successfully started
2023-10-04 15:07:29.219446889  [INFO] Got IP address from supervisor: 192.168.20.10
2023-10-04 15:07:29.252151148  [INFO] Got WebRTC port from supervisor: 8555
2023-10-04 15:07:29.464616081  [INFO] Starting go2rtc...
2023-10-04 15:07:29.550105779  17:07:29.550 INF go2rtc version 1.2.0 linux/amd64
2023-10-04 15:07:29.550318647  17:07:29.550 INF [api] listen addr=:1984
2023-10-04 15:07:29.550497632  17:07:29.550 INF [rtsp] listen addr=:8554
2023-10-04 15:07:29.550645796  17:07:29.550 INF [srtp] listen addr=:8443
2023-10-04 15:07:29.550760151  17:07:29.550 INF [webrtc] listen addr=:8555
2023-10-04 15:07:30.239732211  [2023-10-04 17:07:30] frigate.app                    INFO    : Starting Frigate (0.12.1-367d724)
2023-10-04 15:07:30.249851306  [2023-10-04 17:07:30] frigate.app                    INFO    : Creating directory: /tmp/cache
2023-10-04 15:07:30.250552766  [2023-10-04 17:07:30] peewee_migrate                 INFO    : Starting migrations
2023-10-04 15:07:30.254130669  [2023-10-04 17:07:30] peewee_migrate                 INFO    : There is nothing to migrate
2023-10-04 15:07:30.263742074  [2023-10-04 17:07:30] detector.cpu                   INFO    : Starting detection process: 443
2023-10-04 15:07:30.264079800  [2023-10-04 17:07:30] frigate.app                    INFO    : Output process started: 445
2023-10-04 15:07:30.266067681  [2023-10-04 17:07:30] frigate.detectors              WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes.
2023-10-04 15:07:30.267765004  [2023-10-04 17:07:30] frigate.app                    INFO    : Camera processor started for Eingang: 448
2023-10-04 15:07:30.271605976  [2023-10-04 17:07:30] frigate.app                    INFO    : Capture process started for Eingang: 450
2023-10-04 15:07:39.183326481  [INFO] Starting go2rtc healthcheck service...

Now it is stuck at the go2rtc healthcheck and nothing happens further.

Anyone seen this Frigate behaviour on Firefox 118.01 and recent versions? All the cameras flicker when viewing the cameras page. It’s OK when on Birdseye view. Been doing it for about 6~8 weeks. Doesn’t do it on Chrome or Edge. Frigate 0.12.1-367d724 & go2rtc version 1.8.1
20231017-Frigate-Firefox

This has always happened in firefox for me, but not frigate specifically. Any home assistant camera. I am on 118.0.2 and everything is smoooth like it never has been before. Gotta admit I don’t use firefox as much as I used to, but no. No flickering here.

Thanks for the reply. All my cameras are fine in every dashboard and even in most parts of Frigate (Birdseye, Events), it’s just that one camera page where all (6) cameras are displayed at once that it does it.

Hi guys, i need some help.

I’m on proxmox and everything is installed allright.
However when i start the docker container of frigate i get this message:

2023-11-14 13:00:48.547963151  [2023-11-14 13:00:48] frigate.app                    INFO    : Starting Frigate (0.12.1-367d724)
2023-11-14 13:00:48.574996430  [2023-11-14 13:00:48] frigate.app                    INFO    : Creating directory: /media/frigate/recordings
2023-11-14 13:00:48.578736700  [Errno 13] Permission denied: '/media/frigate/recordings'

the config.yml

the docker compose:

the mount
image

when i go into the Proxmox docker container and i check the folder of /cctv_clips i can access it normally so it mounts correctly.

however the permission is a problem and don’t know what to do now?
regards

Have you got the

/opt/frigate/config:/config

Wrong, this is the format for the new beta versions, it should be

opt/frigate/config/config.yml:/config/config.yml

For the stable version.

Disclaimer, I think?? :slight_smile:

This works for the current version as well

if u did reply to me, i did change it according like you said
However the previous way i did config it did not cause any problems.

However still permission denied:

2023-11-15 13:19:54.019930971  [2023-11-15 13:19:54] frigate.app                    INFO    : Starting Frigate (0.12.1-367d724)
2023-11-15 13:19:54.048295393  [2023-11-15 13:19:54] frigate.app                    INFO    : Creating directory: /media/frigate/recordings
2023-11-15 13:19:54.051472157  [Errno 13] Permission denied: '/media/frigate/recordings'
2023-11-15 13:19:55.384212632  [INFO] Service Frigate exited with code 1 (by signal 0)

My drive i use is an mounted drive CIFS in proxmox, i use this sme drive for various containers with no problem.
So i don’t know if frigate does support cifs as an external hdd in a docker container.

Folders have root access same for the Frigate container.

I need some help re-integrating frigate into Home Assistant (my first post and I have already reviewed documentation and other posts). I had it running, but ran into a problem with my NAS and as part of the resolution had to remove the frigate integration and frigate proxy.

Background Info (everything on a QNAP NAS):

  1. Frigate (latest) is in a docker container (container switch on 10.x.x.3 on container network 10.x.x.1, but accessible via http://192.xxx.xxx.3:5000)
  2. Home Assistant is running as a VM (virtual switch 192.xxx.xxx.3, VM says 192.xxx.x.xx and is accessible via http://homexxxxx.local:8123)
  3. Frigate integration is already installed via HACS and visible in the custom_components
  4. Frigate Proxy is installed (configuration is saved as 192.xxx.xxx.3:5000) and “show in sidebar” is on
  5. Browser preference is Chrome on a PC, but also tried Firefox on PC

Issues:
Clicking on the Frigate Proxy in the sidebar just shows a black screen with HA sidebar. There is a NGINX log via the direct Frigate URL (http://192.xxx.xxx.3:5000) showing the attempted connection:

"GET // HTTP/1.1" 200 10522 "http://homexxxxx.local:8123/ccab4aaf_frigate-proxy" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" "192.xxx.x.x, 172.xx.xx.1, 172.xx.xx.2"
  The 192.xxx.x.x is my PC and not sure what the 172 addresses are from, but the date/time coincide with my attempted view

When I attempt to add Frigate (Settings → Devices & services → Add Integration) using http://192.xxx.x.3:5000/, it responds with “Failed to connect” and there is an entry in the log ([custom_components.frigate.api] Timeout error fetching information from http://192.xxx.x.3:5000/api/stats ). There is a NGINX log via Frigate:

"GET /api/stats HTTP/1.1" 200 2494 "-" "HomeAssistant/2023.11.2 aiohttp/3.8.5 Python/3.11" "-"

I have rebooted the HA VM a few times and my MQTT and Frigate containers. The logger is set as:

custom_components.frigate: debug

Any suggestions of how to fix the problem?
Thanks

Can somebody recommend PC configuration for hardware decoding in frigate that is actually working if i have Proxmox? I have been trying to do it for a long time with checp 710 nvidia etc. but without result. Please somebody write your PC config what gpu is working with pci passthrough…

Anyone ever think it might be nice to have multiple config files?
I have noticed over the years that things change enough to want my settings to be different in different seasons.
Would be awesome to be able to automate different configs for different situations throughout the year. Or even just push a button to choose which scenario is appropriate.

I could maybe keep multiple copies of the config and manually switch them, but no clue how I’d automate that since I’d have to change filenames and keep track of which is which.

Anyone have any ideas?
Thanks

Hello to all I have the same question and having a hard time :sweat_smile:. how are you passing the m.2 card to the lxc container? Can you post please your lxc config when you get a chance, think this will helpful for a lot of people. Thanks have spend last 3 days and I’m going in circles now.
Thank you!

Hay,
Can someone help me out please I have Frigate up and running Great! but it is using the CPU not great
I have a Geforce RTX Ti GPU but I can not seem to get it to work Frigate, can anyone share code to help me out?
Thanks

Keep in mind that video acceleration won’t help with object detection…it will just help you decode the h.264/5 streams coming in. You need another method to help with object detection. The most common is a google coral TPU.

That said try looking here to see if this can help you:

1 Like

Ive look at that link, is this all I have to put?

ffmpeg:
hwaccel_args: preset-nvidia-h264

yes, assuming the previous setup steps have been followed correctly

I will try it out.

Did you ever resolve this? I’m having the same issue.

Unfortunately not. I switched the USB Coral over to an Intel NUC running Debian instead. I have that running Frigate in Docker with no issues and talking to Home Assistant over the network instead of being on the same machine.