Guidance on debugging end to end problems, especially when involving home assistant and webrtc #15684
Replies: 1 comment
-
Seems like you may want to make this post on the frigate card repo, as it's inner workings are different than the Frigate dashboard |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've been using Frigate successfully for a long time now, and mostly it's just greatness. There is one aspect which has always been a bit troubling and it still is, which is optimizing stream performance. The ffmpeg presets made a huge difference here, but still some things are not so simple because the don't either work or not work. Like WebRTC.
My 7 reolink cameras are all setup with flv streams on 2k/h264 instead of the default 4k/h265, all are restreamed by go2rtc. Config for reference: https://gist.github.com/brujoand/2486c80b44d8e914df557519d16b8f92
I should also note that there are two hikvision cameras and the reolink doorbell. Contrary to what I've seen recommended the flv stream is terrible for this device.
Anyway, my main concern with this post is the WebRTC. Frigate is deployed to my k8s cluster, it has a loadbalancer ip for the stun port, reachable over TCP. My home assistant dashboard is also straight forward: https://gist.github.com/brujoand/ab7ba193683bf2b503b272ce79f2dc45
Just my cameras, set to use WebRTC and to use GoRTC as the provider.
On my iphone all streams load instantly and stay working. Perfect. On my Linux laptop all streams load the mjpeg stream waiting for WebRTC, but it mostly just hangs there. While I pick my phone up, watch the same dashboard and get the stream instantly. Why? My phone and laptop are on the same network, using the same DNS server. Looking at the network debugger I only see attempts to fetch the mjpeg stream, and the console shows only this slightly relevant output:
`
Source map error: Error: URL constructor: is not a valid URL.
Stack in the worker:resolveSourceMapURL@resource://devtools/client/shared/source-map-loader/utils/fetchSourceMap.js:56:22
getOriginalURLs@resource://devtools/client/shared/source-map-loader/source-map.js:73:24
workerHandler/</<@resource://devtools/client/shared/worker-utils.js:115:52
workerHandler/<@resource://devtools/client/shared/worker-utils.js:113:13
Resource URL: wasm:https://myhassdomain.example.com/hacsfiles/frigate-hass-card/jsmpeg-1cb0aa9d.js%20line%201%20%3E%20WebAssembly.instantiate
`
If I access the frigate go2rtc dashboard choose a stream and webrtc, the stream loads just fine. So I guess this is a home assistant dashboard problem, but I'm at a loss at how to debug these types of problems. Any pointers?
Beta Was this translation helpful? Give feedback.
All reactions