Closed COUBOT closed 1 year ago
It'll be helpful if you can use top
inside of the frigate container docker exec -it addon_ccab4aaf_frigate-fa top
so we can see what processes are using high amounts of CPU.
also please include logs after frigate has run for a bit
It'll be helpful if you can use
top
inside of the frigate containerdocker exec -it addon_ccab4aaf_frigate-fa top
so we can see what processes are using high amounts of CPU.
Thanks for the quick reply. But I'm pretty new with this kind of stuff and have no clue where to put "docker exec -it addon_ccab4aaf_frigate-fa top".
You need a shell in HA OS whether that is local or via SSH / terminal
I got this:
Okay do
docker exec -it addon_ccab4aaf_frigate-fa apt-get update
docker exec -it addon_ccab4aaf_frigate-fa apt-get install -y procps
docker exec -it addon_ccab4aaf_frigate-fa top
Okay do
docker exec -it addon_ccab4aaf_frigate-fa apt-get update
docker exec -it addon_ccab4aaf_frigate-fa apt-get install -y procps
docker exec -it addon_ccab4aaf_frigate-fa top
this worked:
Is there more to the screenshot or can you scroll it to the right? The first ffmpeg process is using a lot of CPU. also please include logs from frigate.
No, there is nothing more to see on the screenshot.
Here is the log: [s6-init] making user provided files available at /var/run/s6/etc...exited 0. [s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] done. [services.d] starting services [services.d] done. [2022-11-21 23:43:31] frigate.app INFO : Starting Frigate (0.11.1-2eada21) [2022-11-21 23:43:31] frigate.app INFO : Creating directory: /tmp/cache Starting migrations [2022-11-21 23:43:31] peewee_migrate INFO : Starting migrations There is nothing to migrate [2022-11-21 23:43:31] peewee_migrate INFO : There is nothing to migrate [2022-11-21 23:43:31] frigate.app INFO : Output process started: 218 [2022-11-21 23:43:31] detector.coral INFO : Starting detection process: 217 [2022-11-21 23:43:31] frigate.edgetpu INFO : Attempting to load TPU as usb [2022-11-21 23:43:31] frigate.app INFO : Camera processor started for Vordergarten_Frigate: 221 [2022-11-21 23:43:31] frigate.app INFO : Camera processor started for Hintergarten_Frigate: 223 [2022-11-21 23:43:31] frigate.app INFO : Capture process started for Vordergarten_Frigate: 224 [2022-11-21 23:43:31] ws4py INFO : Using epoll [2022-11-21 23:43:31] frigate.app INFO : Capture process started for Hintergarten_Frigate: 228 [2022-11-21 23:43:31] ws4py INFO : Using epoll [2022-11-21 23:43:34] frigate.edgetpu INFO : TPU found [2022-11-21 23:45:00] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:49092] [2022-11-21 23:45:06] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:49092] [2022-11-21 23:58:41] ffmpeg.Vordergarten_Frigate.record_rtmp ERROR : http://192.168.178.50/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=123456: Connection timed out [2022-11-21 23:58:41] watchdog.Vordergarten_Frigate INFO : Terminating the existing ffmpeg process... [2022-11-21 23:58:41] watchdog.Vordergarten_Frigate INFO : Waiting for ffmpeg to exit gracefully... [2022-11-21 23:58:41] ffmpeg.Hintergarten_Frigate.record_rtmp ERROR : http://192.168.178.50/flv?port=1935&app=bcs&stream=channel1_sub.bcs&user=admin&password=123456: Connection timed out [2022-11-21 23:58:41] watchdog.Hintergarten_Frigate INFO : Terminating the existing ffmpeg process... [2022-11-21 23:58:41] watchdog.Hintergarten_Frigate INFO : Waiting for ffmpeg to exit gracefully... [2022-11-21 23:58:51] ffmpeg.Vordergarten_Frigate.record_rtmp ERROR : [tcp @ 0x55a8a885e0] Connection to tcp://192.168.178.50:80 failed: Connection timed out [2022-11-21 23:58:51] ffmpeg.Vordergarten_Frigate.record_rtmp ERROR : http://192.168.178.50/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=123456: Connection timed out [2022-11-21 23:58:51] watchdog.Vordergarten_Frigate INFO : Terminating the existing ffmpeg process... [2022-11-21 23:58:51] watchdog.Vordergarten_Frigate INFO : Waiting for ffmpeg to exit gracefully... [2022-11-21 23:58:51] ffmpeg.Hintergarten_Frigate.record_rtmp ERROR : [tcp @ 0x559520a5e0] Connection to tcp://192.168.178.50:80 failed: Connection timed out [2022-11-21 23:58:51] ffmpeg.Hintergarten_Frigate.record_rtmp ERROR : http://192.168.178.50/flv?port=1935&app=bcs&stream=channel1_sub.bcs&user=admin&password=123456: Connection timed out [2022-11-21 23:58:51] watchdog.Hintergarten_Frigate INFO : Terminating the existing ffmpeg process... [2022-11-21 23:58:51] watchdog.Hintergarten_Frigate INFO : Waiting for ffmpeg to exit gracefully... [2022-11-21 23:59:01] ffmpeg.Vordergarten_Frigate.record_rtmp ERROR : [tcp @ 0x557d7c15e0] Connection to tcp://192.168.178.50:80 failed: Connection timed out [2022-11-21 23:59:01] ffmpeg.Vordergarten_Frigate.record_rtmp ERROR : http://192.168.178.50/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=admin&password=123456: Connection timed out [2022-11-21 23:59:01] watchdog.Vordergarten_Frigate INFO : Terminating the existing ffmpeg process... [2022-11-21 23:59:01] watchdog.Vordergarten_Frigate INFO : Waiting for ffmpeg to exit gracefully... [2022-11-21 23:59:01] ffmpeg.Hintergarten_Frigate.record_rtmp ERROR : [tcp @ 0x55b4c755e0] Connection to tcp://192.168.178.50:80 failed: Connection timed out [2022-11-21 23:59:01] ffmpeg.Hintergarten_Frigate.record_rtmp ERROR : http://192.168.178.50/flv?port=1935&app=bcs&stream=channel1_sub.bcs&user=admin&password=123456: Connection timed out [2022-11-21 23:59:01] watchdog.Hintergarten_Frigate INFO : Terminating the existing ffmpeg process... [2022-11-21 23:59:01] watchdog.Hintergarten_Frigate INFO : Waiting for ffmpeg to exit gracefully... [2022-11-21 23:59:15] frigate.video ERROR : Vordergarten_Frigate: Unable to read frames from ffmpeg process. [2022-11-21 23:59:15] frigate.video ERROR : Vordergarten_Frigate: ffmpeg process is not running. exiting capture thread... [2022-11-21 23:59:21] watchdog.Vordergarten_Frigate ERROR : Ffmpeg process crashed unexpectedly for Vordergarten_Frigate. [2022-11-21 23:59:21] watchdog.Vordergarten_Frigate ERROR : The following ffmpeg logs include the last 100 lines prior to exit. [2022-11-21 23:59:21] ffmpeg.Vordergarten_Frigate.detect ERROR : [flv @ 0x5596329c80] Packet corrupt (stream = 0, dts = 895132), dropping it. [2022-11-21 23:59:21] ffmpeg.Vordergarten_Frigate.detect ERROR : http://192.168.178.50/flv?port=1935&app=bcs&stream=channel0_sub.bcs&user=admin&password=123456: Connection timed out [2022-11-21 23:59:21] ffmpeg.Vordergarten_Frigate.detect ERROR : Last message repeated 6 times [2022-11-21 23:59:21] watchdog.Hintergarten_Frigate INFO : No frames received from Hintergarten_Frigate in 20 seconds. Exiting ffmpeg... [2022-11-21 23:59:21] watchdog.Hintergarten_Frigate INFO : Waiting for ffmpeg to exit gracefully... [2022-11-21 23:59:27] frigate.video ERROR : Hintergarten_Frigate: Unable to read frames from ffmpeg process. [2022-11-21 23:59:27] frigate.video ERROR : Hintergarten_Frigate: ffmpeg process is not running. exiting capture thread... [2022-11-21 23:59:37] watchdog.Hintergarten_Frigate ERROR : Ffmpeg process crashed unexpectedly for Hintergarten_Frigate. [2022-11-21 23:59:37] watchdog.Hintergarten_Frigate ERROR : The following ffmpeg logs include the last 100 lines prior to exit. [2022-11-21 23:59:37] ffmpeg.Hintergarten_Frigate.detect ERROR : More than 1000 frames duplicated [2022-11-21 23:59:37] ffmpeg.Hintergarten_Frigate.detect ERROR : [flv @ 0x55cd601c80] Packet corrupt (stream = 0, dts = 882160), dropping it. [2022-11-21 23:59:37] ffmpeg.Hintergarten_Frigate.detect ERROR : http://192.168.178.50/flv?port=1935&app=bcs&stream=channel1_sub.bcs&user=admin&password=123456: Connection timed out [2022-11-21 23:59:37] ffmpeg.Hintergarten_Frigate.detect ERROR : Last message repeated 2 times [2022-11-21 23:59:38] ws4py INFO : Managing websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:55602] [2022-11-21 23:59:41] ws4py INFO : Managing websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:33116] [2022-11-21 23:59:44] ws4py INFO : Terminating websocket [Local => 127.0.0.1:5002 | Remote => 127.0.0.1:55602] [2022-11-21 23:59:44] ws4py INFO : Terminating websocket [Local => 127.0.0.1:8082 | Remote => 127.0.0.1:33116]
You should be able to run top
and use the right arrow key to move the row to the right and see which ffmpeg process that is.
Otherwise, a screenshot of the debug page will be helpful and the output from /API/stats
That's the whole page I'm seeing. If I press the right arrow key, the table moves and hides in the left. And the Debug Page:
Ah that's only a feature of htop.
If you can go to `
Yeah, HA just crashed. I need a bit. Is `/API/stats also in SSH?
Do that in the browser. Like if you're looking at /debug replace /debug with /API/stats
I'm sorry but I can't find it. Do you mean the SCS Server Browser?
No I mean web browser
I don't think so, where do you view the frigate UI?
maybe try http://homeassistant.local:8123/ccab4aaf_frigate-fa/dashboard/api/stats otherwise you'd need to do http://homeassistant.local:5000/api/stats but that would require enabled the 5000 port mapping in frigate addon options
the last one worked:
{"Hintergarten_Frigate":{"camera_fps":0.0,"capture_pid":232,"detection_fps":0.0,"pid":226,"process_fps":0.0,"skipped_fps":0.0},"Vordergarten_Frigate":{"camera_fps":0.0,"capture_pid":228,"detection_fps":0.0,"pid":225,"process_fps":0.0,"skipped_fps":0.0},"detection_fps":0.0,"detectors":{"coral":{"detection_start":0.0,"inference_speed":10.0,"pid":216}},"service":{"latest_version":"0.11.1","storage":{"/dev/shm":{"free":875.8,"mount_type":"tmpfs","total":876.2,"used":0.4},"/media/frigate/clips":{"free":206984.6,"mount_type":"ext4","total":235527.2,"used":18931.5},"/media/frigate/recordings":{"free":206984.6,"mount_type":"ext4","total":235527.2,"used":18931.5},"/tmp/cache":{"free":876.2,"mount_type":"tmpfs","total":876.2,"used":0.0}},"temperatures":{},"uptime":1,"version":"0.11.1-2eada21"}}
Thanks for that, that is helpful. Can you show a screenshot of the VLC resolution output for each camera subsream
Of course
The First one: And the second one:
I just saw I copy pasted wrong resolutions.
Yes, that looks to be the issue. Should be 640x360 and 1536x576
Thats sooooo awkward
But thank you very much for your patience
Awesome that's much better. I'll go ahead and close this then 👍
Describe the problem you are having
Hey
I have a lot of problems setting up Frigate correctly.
I have two different Reolink cameras and the Coral GPU. I thought I had everything set up correctly, but apparently not.
I have enabled hardware acceleration, set detection size to the size seen in VLC and have set up motion masks for bushes etc. .
But the CPU usage is extremly high and Homeassistant crashes often.
Can you help me?
Version
0.11.1-2EADA21
Frigate config file
Relevant log output
FFprobe output from your camera
Frigate stats
Operating system
HassOS
Install method
HassOS Addon
Coral version
USB
Network connection
Wired
Camera make and model
Reolink RLC-811A and Reolink Duo 2 PoE
Any other information that may be helpful
I'm running Home Assistant OS on an Rasbperry Pi 4 2GB