Closed Havenkoff closed 9 months ago
your camera is refusing the connection, this doesn't have anything to do with hwaccel. It is possible that the camera is UDP only, maybe try this
go2rtc:
streams:
desk_main:
- "ffmpeg:rtsp://admin:xxxxxxxx@192.168.18.20:554/mode=real&idc=1&ids=1"
desk_sub:
- "ffmpeg:rtsp://admin:xxxxxxxx@192.168.18.20:554/mode=real&idc=1&ids=2"
Thank you so for replying i made the changes but i still get the same error
2023-12-07 14:10:18.374272267 [2023-12-07 15:10:18] frigate.app INFO : Starting Frigate (0.12.1-367d724) 2023-12-07 14:10:18.419946739 [2023-12-07 15:10:18] frigate.app INFO : Creating directory: /tmp/cache 2023-12-07 14:10:18.427277830 [2023-12-07 15:10:18] peewee_migrate INFO : Starting migrations 2023-12-07 14:10:18.440698029 [2023-12-07 15:10:18] peewee_migrate INFO : There is nothing to migrate 2023-12-07 14:10:18.515215410 [2023-12-07 15:10:18] frigate.app INFO : Output process started: 302 2023-12-07 14:10:18.537843824 [2023-12-07 15:10:18] detector.coral INFO : Starting detection process: 300 2023-12-07 14:10:18.551965644 [2023-12-07 15:10:18] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as usb 2023-12-07 14:10:21.691213009 [2023-12-07 15:10:18] frigate.app INFO : Camera processor started for desk_main: 304 2023-12-07 14:10:21.691956962 [2023-12-07 15:10:18] frigate.app INFO : Capture process started for desk_main: 309 2023-12-07 14:10:21.709997287 [2023-12-07 15:10:21] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found 2023-12-07 14:10:22.143298491 [2023-12-07 15:10:22] frigate.video ERROR : desk_main: Unable to read frames from ffmpeg process. 2023-12-07 14:10:22.143974131 [2023-12-07 15:10:22] frigate.video ERROR : desk_main: ffmpeg process is not running. exiting capture thread... 2023-12-07 14:10:24.206312520 [INFO] Starting go2rtc healthcheck service... 2023-12-07 14:10:26.475657008 172.30.32.2 - - [07/Dec/2023:15:10:26 +0100] "GET / HTTP/1.1" 200 6641 "-" "HomeAssistantSupervisor/2023.11.6 aiohttp/3.9.1 Python/3.11" "-" 2023-12-07 14:10:38.701769314 [2023-12-07 15:10:38] watchdog.desk_main ERROR : Ffmpeg process crashed unexpectedly for desk_main. 2023-12-07 14:10:38.701796628 [2023-12-07 15:10:38] watchdog.desk_main ERROR : The following ffmpeg logs include the last 100 lines prior to exit. 2023-12-07 14:10:38.701829572 [2023-12-07 15:10:38] ffmpeg.desk_main.detect ERROR : [tcp @ 0x55b19e5e60] Connection to tcp://"ipadress":554?timeout=5000000 failed: No route to host
my camera has a rtsp port as well as the rtmp one but i saw nothing about udp at the interface of my camera.
I'll change it to rtmp preset when I get back will give an update
i played around with it but i'm like 70% sure my camere does support rtsp it also can support http and https protocol. It no longer refuses the connection but the tcp connection keeps timing out any ideas? These are my logs: 2023-12-07 22:08:47.062575267 23:08:47.062 INF go2rtc version 1.2.0 linux/arm64 2023-12-07 22:08:47.063730738 23:08:47.063 INF [api] listen addr=:1984 2023-12-07 22:08:47.065310909 23:08:47.065 INF [rtsp] listen addr=:8554 2023-12-07 22:08:47.066540342 23:08:47.066 INF [srtp] listen addr=:8443 2023-12-07 22:08:47.067753219 23:08:47.067 INF [webrtc] listen addr=:8555 2023-12-07 22:08:49.933446915 [2023-12-07 23:08:49] frigate.app INFO : Starting Frigate (0.12.1-367d724) 2023-12-07 22:08:49.979369877 [2023-12-07 23:08:49] frigate.app INFO : Creating directory: /tmp/cache 2023-12-07 22:08:49.986740216 [2023-12-07 23:08:49] peewee_migrate INFO : Starting migrations 2023-12-07 22:08:50.003840242 [2023-12-07 23:08:50] peewee_migrate INFO : There is nothing to migrate 2023-12-07 22:08:50.074441327 [2023-12-07 23:08:50] frigate.app INFO : Output process started: 302 2023-12-07 22:08:50.086318365 [2023-12-07 23:08:50] detector.coral INFO : Starting detection process: 300 2023-12-07 22:08:50.087423188 [2023-12-07 23:08:50] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as usb 2023-12-07 22:08:50.109256189 [2023-12-07 23:08:50] frigate.app INFO : Camera processor started for desk_sub: 304 2023-12-07 22:08:50.126818193 [2023-12-07 23:08:50] frigate.app INFO : Capture process started for desk_sub: 306 2023-12-07 22:08:53.833116855 [2023-12-07 23:08:53] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found 2023-12-07 22:08:55.569945169 [2023-12-07 23:08:55] frigate.video ERROR : desk_sub: Unable to read frames from ffmpeg process. 2023-12-07 22:08:55.571000289 [2023-12-07 23:08:55] frigate.video ERROR : desk_sub: ffmpeg process is not running. exiting capture thread... 2023-12-07 22:08:55.824216366 [INFO] Starting go2rtc healthcheck service... 2023-12-07 22:09:10.203024671 [2023-12-07 23:09:10] watchdog.desk_sub ERROR : Ffmpeg process crashed unexpectedly for desk_sub. 2023-12-07 22:09:10.204302937 [2023-12-07 23:09:10] watchdog.desk_sub ERROR : The following ffmpeg logs include the last 100 lines prior to exit. 2023-12-07 22:09:10.205377316 [2023-12-07 23:09:10] ffmpeg.desk_sub.detect ERROR : [tcp @ 0x55a9b7be60] Connection to tcp://XXX.XXX.XX.X:554?timeout=5000000 failed: Connection timed out 2023-12-07 22:09:10.206542935 [2023-12-07 23:09:10] ffmpeg.desk_sub.detect ERROR : rtsp://XXX.XXX.XX.X:554/desk_sub: Connection timed out 2023-12-07 22:09:15.510300297 [2023-12-07 23:09:15] frigate.video ERROR : desk_sub: Unable to read frames from ffmpeg process. 2023-12-07 22:09:15.511428287 [2023-12-07 23:09:15] frigate.video ERROR : desk_sub: ffmpeg process is not running. exiting capture thread... 2023-12-07 22:09:20.236773016 [2023-12-07 23:09:20] watchdog.desk_sub ERROR : Ffmpeg process crashed unexpectedly for desk_sub. 2023-12-07 22:09:20.237471194 [2023-12-07 23:09:20] watchdog.desk_sub ERROR : The following ffmpeg logs include the last 100 lines prior to exit. 2023-12-07 22:09:20.238177558 [2023-12-07 23:09:20] ffmpeg.desk_sub.detect ERROR : [tcp @ 0x55a773fe60] Connection to tcp://XXX.XXX.XX.X:554?timeout=5000000 failed: Connection timed out 2023-12-07 22:09:20.238882941 [2023-12-07 23:09:20] ffmpeg.desk_sub.detect ERROR : rtsp://XXX.XXX.XX.X:554/desk_sub: Connection timed out 2023-12-07 22:09:25.542699549 [2023-12-07 23:09:25] frigate.video ERROR : desk_sub: Unable to read frames from ffmpeg process. 2023-12-07 22:09:25.543413302 [2023-12-07 23:09:25] frigate.video ERROR : desk_sub: ffmpeg process is not running. exiting capture thread... 2023-12-07 22:09:30.271342234 [2023-12-07 23:09:30] watchdog.desk_sub ERROR : Ffmpeg process crashed unexpectedly for desk_sub. 2023-12-07 22:09:30.272915627 [2023-12-07 23:09:30] watchdog.desk_sub ERROR : The following ffmpeg logs include the last 100 lines prior to exit. 2023-12-07 22:09:30.272940201 [2023-12-07 23:09:30] ffmpeg.desk_sub.detect ERROR : [tcp @ 0x55cc096e60] Connection to tcp://XXX.XXX.XX.X:554?timeout=5000000 failed: Connection timed out 2023-12-07 22:09:30.273058645 [2023-12-07 23:09:30] ffmpeg.desk_sub.detect ERROR : rtsp://XXX.XXX.XX.X:554/desk_sub: Connection timed out 2023-12-07 22:09:35.495354557 172.30.32.2 - - [07/Dec/2023:23:09:35 +0100] "GET / HTTP/1.1" 200 6641 "-" "HomeAssistantSupervisor/2023.11.6 aiohttp/3.9.1 Python/3.11" "-"
I reduced the amount of streams to minimal, kept the one only for detection. I no longer have a refusal of connection error. Now it's about the tcp connection timing out i searched around different issues but i don't know what could be the problem. For now these are my logs: 2023-12-08 15:49:13.416659893 [INFO] Got WebRTC port from supervisor: 8555 2023-12-08 15:49:14.192616539 [INFO] Starting go2rtc... 2023-12-08 15:49:14.387855563 16:49:14.387 INF go2rtc version 1.2.0 linux/arm64 2023-12-08 15:49:14.389330044 16:49:14.389 INF [api] listen addr=:1984 2023-12-08 15:49:14.390598362 16:49:14.390 INF [rtsp] listen addr=:8554 2023-12-08 15:49:14.391861457 16:49:14.391 INF [srtp] listen addr=:8443 2023-12-08 15:49:14.393000814 16:49:14.392 INF [webrtc] listen addr=:8555 2023-12-08 15:49:17.229630272 [2023-12-08 16:49:17] frigate.app INFO : Starting Frigate (0.12.1-367d724) 2023-12-08 15:49:17.275687996 [2023-12-08 16:49:17] frigate.app INFO : Creating directory: /tmp/cache 2023-12-08 15:49:17.283153384 [2023-12-08 16:49:17] peewee_migrate INFO : Starting migrations 2023-12-08 15:49:17.300036341 [2023-12-08 16:49:17] peewee_migrate INFO : There is nothing to migrate 2023-12-08 15:49:17.375746084 [2023-12-08 16:49:17] detector.coral INFO : Starting detection process: 300 2023-12-08 15:49:17.383126103 [2023-12-08 16:49:17] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as usb 2023-12-08 15:49:20.512090145 [2023-12-08 16:49:17] frigate.app INFO : Output process started: 302 2023-12-08 15:49:20.512484825 [2023-12-08 16:49:17] frigate.app INFO : Camera processor started for desk_sub: 307 2023-12-08 15:49:20.512998282 [2023-12-08 16:49:17] frigate.app INFO : Capture process started for desk_sub: 310 2023-12-08 15:49:20.530044384 [2023-12-08 16:49:20] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found 2023-12-08 15:49:22.938097431 [2023-12-08 16:49:22] frigate.video ERROR : desk_sub: Unable to read frames from ffmpeg process. 2023-12-08 15:49:22.939530024 [2023-12-08 16:49:22] frigate.video ERROR : desk_sub: ffmpeg process is not running. exiting capture thread... 2023-12-08 15:49:23.104575143 [INFO] Starting go2rtc healthcheck service... 2023-12-08 15:49:37.538398223 [2023-12-08 16:49:37] watchdog.desk_sub ERROR : Ffmpeg process crashed unexpectedly for desk_sub. 2023-12-08 15:49:37.557565627 [2023-12-08 16:49:37] watchdog.desk_sub ERROR : The following ffmpeg logs include the last 100 lines prior to exit. 2023-12-08 15:49:37.558348803 [2023-12-08 16:49:37] ffmpeg.desk_sub.detect ERROR : [tcp @ 0x557bc5ee60] Connection to tcp://192.168.18.3:554?timeout=5000000 failed: Connection timed out 2023-12-08 15:49:37.558941684 [2023-12-08 16:49:37] ffmpeg.desk_sub.detect ERROR : rtsp://:@192.168.18.3:554/mode=real&idc=1&ids=2: Connection timed out 2023-12-08 15:49:42.856397079 [2023-12-08 16:49:42] frigate.video ERROR : desk_sub: Unable to read frames from ffmpeg process. 2023-12-08 15:49:42.857243031 [2023-12-08 16:49:42] frigate.video ERROR : desk_sub: ffmpeg process is not running. exiting capture thread... 2023-12-08 15:49:47.575570250 [2023-12-08 16:49:47] watchdog.desk_sub ERROR : Ffmpeg process crashed unexpectedly for desk_sub. 2023-12-08 15:49:47.576630384 [2023-12-08 16:49:47] watchdog.desk_sub ERROR : The following ffmpeg logs include the last 100 lines prior to exit. 2023-12-08 15:49:47.576751697 [2023-12-08 16:49:47] ffmpeg.desk_sub.detect ERROR : [tcp @ 0x557ef6ce60] Connection to tcp://192.168.18.3:554?timeout=5000000 failed: Connection timed out 2023-12-08 15:49:47.577697611 [2023-12-08 16:49:47] ffmpeg.desk_sub.detect ERROR : rtsp://:@192.168.18.3:554/mode=real&idc=1&ids=2: Connection timed out 2023-12-08 15:49:50.541612923 172.30.32.2 - - [08/Dec/2023:16:49:50 +0100] "GET / HTTP/1.1" 200 6641 "-" "HomeAssistantSupervisor/2023.11.6 aiohttp/3.9.1 Python/3.11" "-"
And this is my config file:
mqtt:
host: 192.168.XX.XX
port: 1883
topic_prefix: frigate
client_id: frigate
user: mqttuser
password: password2
stats_interval: 300
go2rtc:
streams:
desk_sub:
- "ffmpeg: rtsp://user:password@192.168.18.3:554/mode=real&idc=1&ids=2"
cameras:
desk_sub:
ffmpeg:
hwaccel_args: preset-rpi-64-h264
inputs:
- path: rtsp://user:password@192.168.18.3:554/mode=real&idc=1&ids=2
input_args: preset-rtsp-restream
roles:
- detect
detect:
enabled: False
width: 330
height: 330
fps: 5
detectors:
coral:
type: edgetpu
device: usb
Maybe try
go2rtc:
streams:
desk_sub:
- "ffmpeg: rtsp://user:password@192.168.18.3:554/mode=real&idc=1&ids=2#input=rtsp/udp"
Thank you for your help, I changed it but it has the same error. Also i found the FFProbe of my camera but it says this:
FFPROBE OUTPUT
Stream 0:
Return Code: 1
Error:
If it's any useful information my camera is connected to my pc via ethernet cable and is powered separately. Additionally my HASSOS is live on rpi4 that is connected to the internet via wi-fi not ethernet. In my camera there is an HTTP port and HTTP port. Should i try to change it to the http camera configuration ?
Ah frick it's that hour. In my havoc of changing the configuration i forgot to set the ip adress to the correct one. I changed it to the right one but one i have no route to host for some weird reason.
2023-12-08 17:50:43.095331241 [INFO] Starting Frigate...
2023-12-08 17:50:47.209865802 [2023-12-08 18:50:47] frigate.app INFO : Starting Frigate (0.12.1-367d724)
2023-12-08 17:50:47.255313940 [2023-12-08 18:50:47] frigate.app INFO : Creating directory: /tmp/cache
2023-12-08 17:50:47.262764606 [2023-12-08 18:50:47] peewee_migrate INFO : Starting migrations
2023-12-08 17:50:47.280835296 [2023-12-08 18:50:47] peewee_migrate INFO : There is nothing to migrate
2023-12-08 17:50:47.348132883 [2023-12-08 18:50:47] detector.coral INFO : Starting detection process: 301
2023-12-08 17:50:47.350030290 [2023-12-08 18:50:47] frigate.app INFO : Output process started: 303
2023-12-08 17:50:47.358261022 [2023-12-08 18:50:47] frigate.detectors.plugins.edgetpu_tfl INFO : Attempting to load TPU as usb
2023-12-08 17:50:50.513007349 [2023-12-08 18:50:47] frigate.app INFO : Camera processor started for desk_sub: 307
2023-12-08 17:50:50.514653018 [2023-12-08 18:50:47] frigate.app INFO : Capture process started for desk_sub: 309
2023-12-08 17:50:50.532317989 [2023-12-08 18:50:50] frigate.detectors.plugins.edgetpu_tfl INFO : TPU found
2023-12-08 17:50:50.982428173 [2023-12-08 18:50:50] frigate.video ERROR : desk_sub: Unable to read frames from ffmpeg process.
2023-12-08 17:50:50.983329331 [2023-12-08 18:50:50] frigate.video ERROR : desk_sub: ffmpeg process is not running. exiting capture thread...
2023-12-08 17:51:07.513277230 [2023-12-08 18:51:07] watchdog.desk_sub ERROR : Ffmpeg process crashed unexpectedly for desk_sub.
2023-12-08 17:51:07.513304433 [2023-12-08 18:51:07] watchdog.desk_sub ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2023-12-08 17:51:07.513650096 [2023-12-08 18:51:07] ffmpeg.desk_sub.detect ERROR : [tcp @ 0x55a6268e60] Connection to tcp://192.168.18.11:554?timeout=5000000 failed: No route to host
2023-12-08 17:51:07.514468032 [2023-12-08 18:51:07] ffmpeg.desk_sub.detect ERROR : rtsp://*:*@192.168.18.11:554/mode=real&idc=1&ids=2: No route to host
2023-12-08 17:51:10.888043232 [2023-12-08 18:51:10] frigate.video ERROR : desk_sub: Unable to read frames from ffmpeg process.
2023-12-08 17:51:10.889425329 [2023-12-08 18:51:10] frigate.video ERROR : desk_sub: ffmpeg process is not running. exiting capture thread...
2023-12-08 17:51:17.550251762 [2023-12-08 18:51:17] watchdog.desk_sub ERROR : Ffmpeg process crashed unexpectedly for desk_sub.
2023-12-08 17:51:17.550835312 [2023-12-08 18:51:17] watchdog.desk_sub ERROR : The following ffmpeg logs include the last 100 lines prior to exit.
2023-12-08 17:51:17.551355955 [2023-12-08 18:51:17] ffmpeg.desk_sub.detect ERROR : [tcp @ 0x55c813ce60] Connection to tcp://192.168.18.11:554?timeout=5000000 failed: No route to host
Ok a couple of updates: my cameras got ip banned i don't really know why apart from that it's either my isp or the firm that produces the camera itself. Fixed it today. I set up my camera this time through onvif device manager, and picked the UDP protocol. I will try to make it work today.
JESUS FUCKING CHRIST I DID IT (excuse my french), after actually 3 weeks of slamming my head against my desk i discovered the problem. The problem was that i did not include the quotation marks " " for the path to my stream. If i have any problems with detection i will open a seperate problems. Thank you @NickM-27 for your help earlier hope you have a good day.
Describe the problem you are having
I have tried a number of configs to set up a basic feed of my camera but to no avail. I keep getting the same error in the logs whatever i try. I am a new user of HASSOS, and I'm still thinking about what i can do to fix this problem.
Version
0.12.1-367d724
Frigate config file
docker-compose file or Docker CLI command
Relevant log output
FFprobe output from your camera
Operating system
HassOS
Install method
HassOS Addon
Network connection
Wired
Camera make and model
KENIK KG-4230DAS-IL
Any other information that may be helpful
I suspect the problem lies with either the preset of the input arguments but i changed those to rstp generic and rtsp restream still nothing my camera supports rtsp and rtmp and the chosen compression of the video feed is H.265.