WebRTC
WebRTC copied to clipboard
1 camera stopped working after 24 hours
I just got this set up yesterday at ~24 hours and 45 minutes ago. For the past 45 minutes or so, I've been trying to resolve this issue, and I have no clue what is going on. The camera cuts out and only works once in a while, no matter which device I am using. It gives me an error saying "ERROR: No video" and then doesn't load. Sometimes it plays for a few seconds, and then cuts out.
I tried various things on my Dahua camera, such as adjusting the FPS and resolution, but keeping the frame interval to 2 seconds (15 FPS /30 I frame interval). I managed to find some logs, after refreshing the browser at exactly 20:17:00:
2022-05-31 20:17:00 DEBUG (webrtc) [custom_components.webrtc.utils] 2022/05/31 20:17:00 websocket.JSON.Receive EOF
2022-05-31 20:17:00 DEBUG (webrtc) [custom_components.webrtc.utils] [GIN] 2022/05/31 - 20:17:00 | 200 | 1m12s | 127.0.0.1 | GET "/ws?url=rtsp://cam:[email protected]:554/live"
2022-05-31 20:17:01 DEBUG (webrtc) [custom_components.webrtc.utils] 2022/05/31 20:17:01 Stream Try Connect rtsp://cam:[email protected]:554/live
2022-05-31 20:17:01 DEBUG (webrtc) [custom_components.webrtc.utils] 2022/05/31 20:17:01 dial tcp 192.168.1.111:554: connect: connection refused
2022-05-31 20:17:01 DEBUG (webrtc) [custom_components.webrtc.utils] 2022/05/31 20:17:01 Stream Exit On Demand No Viewer
2022-05-31 20:17:01 DEBUG (webrtc) [custom_components.webrtc.utils] 2022/05/31 20:17:01 Set ICEServers [stun:stun.l.google.com:19302]
2022-05-31 20:17:01 DEBUG (webrtc) [custom_components.webrtc.utils] 2022/05/31 20:17:01 Set ICEServers [stun:stun.l.google.com:19302]
2022-05-31 20:17:02 DEBUG (webrtc) [custom_components.webrtc.utils] 2022/05/31 20:17:02 websocket.JSON.Receive EOF
2022-05-31 20:17:02 DEBUG (webrtc) [custom_components.webrtc.utils] [GIN] 2022/05/31 - 20:17:02 | 200 | 1.362490859s | 127.0.0.1 | GET "/ws?url=rtsp://rtsp:[email protected]:554/av_stream/ch0"
2022-05-31 20:17:05 DEBUG (webrtc) [custom_components.webrtc.utils] 2022/05/31 20:17:05 muxerWebRTC.WritePacket WebRTC Client Offline
2022-05-31 20:17:11 DEBUG (webrtc) [custom_components.webrtc.utils] 2022/05/31 20:17:11 noVideo
2022-05-31 20:17:11 DEBUG (webrtc) [custom_components.webrtc.utils] 2022/05/31 20:17:11 noVideo
I see a couple of errors: WebRTC Client Offline
and noVideo
.
This is not a network issue or anything like that, because I just watched the RTSP stream with VLC for a couple of minutes and the second counter never skipped a beat.
I did try to restart Home Assistant as well, but no change what so ever.
noVideo
is usual happens when is no keyframe for 10 seconds. You did right when changed "frame interval to 2 seconds". Don't know why this is not helps.
Check my new project. Maybe it handle this situation https://github.com/AlexxIT/go2rtc
Should be fixed in v3