go2rtc is installed as docker container on my Linux server.
I use RTSPtoWebRTC and generic camera with RTSP stream to the server in HA.
And the Picture Entity card works fine with one laptop (Chrome, Win 10).
But if I open the camera card in the (official) mobile app of HA or on another laptop (Brave, Win 11), the list of cameras on the server disappears. As the result, I can't watch video on these devices.
I face the same problem if I try to view the camera from the server (webrtc link). MSE link works fine everywhere.
Log of webrtc (restart the container, try to open the card from the first laptop, and try to open the card from the second one):
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
exit OK
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 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 legacy-services: starting
s6-rc: info: service legacy-services successfully started
14:41:58.468 INF [rtsp] listen addr=:8554
14:41:58.468 INF [api] listen addr=:1984
14:41:58.469 INF [webrtc] listen addr=:8555
14:42:18.781 TRC [rtsp] client request:
DESCRIBE rtsp://IP:8554/Streaming/Channels/101 RTSP/1.0
Accept: application/sdp
Require: www.onvif.org/ver20/backchannel
CSeq: 1
14:42:18.795 TRC [rtsp] client response:
RTSP/1.0 401 Unauthorized
Www-Authenticate: Digest realm="admin", nonce="40078a4a68047f67a31d1317fa57dc1c", stale="FALSE"
Cseq: 1
Date: Thu Aug 25 17:42:18 2022
Server: rtsp_demo
14:42:18.795 TRC [rtsp] client request:
DESCRIBE rtsp://IP:8554/Streaming/Channels/101 RTSP/1.0
Accept: application/sdp
Require: www.onvif.org/ver20/backchannel
CSeq: 2
Authorization: Digest username="user", realm="admin", nonce="40078a4a68047f67a31d1317fa57dc1c", uri="/Streaming/Channels/101", response="713e906ecf0439c518618132c82ecbc2"
14:42:18.806 TRC [rtsp] client response:
RTSP/1.0 200 OK
Cseq: 2
Date: Thu Aug 25 17:42:18 2022
Content-Length: 502
Server: rtsp_demo
Content-Type: application/sdp
v=0
o=- 0 0 IN IP4 0.0.0.0
s=pps_rtsp
t=0 0
a=control:rtsp://IP:8554/Streaming/Channels/101
a=range:npt=0-
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;sprop-parameter-sets=J00AKOdAPAET8uApQUFBfAAAAwAEAAADAKLAgAEk+AAbd1//wKA=,KO48gA==
a=control:rtsp://IP:8554/Streaming/Channels/101/track1
m=audio 0 RTP/AVP 97
c=IN IP4 0.0.0.0
a=rtpmap:97 PCMU/8000/1
a=control:rtsp://IP:8554/Streaming/Channels/101/track2
14:42:18.807 TRC [rtsp] client request:
SETUP rtsp://IP:8554/Streaming/Channels/101/track2 RTSP/1.0
Transport: RTP/AVP/TCP;unicast;interleaved=2-3
CSeq: 3
Authorization: Digest username="user", realm="admin", nonce="40078a4a68047f67a31d1317fa57dc1c", uri="/Streaming/Channels/101/track2", response="8f228629d8d71b5422e23b10e516deb9"
14:42:18.816 TRC [rtsp] client response:
RTSP/1.0 200 OK
Cseq: 3
Date: Thu Aug 25 17:42:18 2022
Session: 00000075
Transport: RTP/AVP/TCP;ssrc=2234569E;interleaved=2-3
Server: rtsp_demo
14:42:18.817 TRC [rtsp] client request:
SETUP rtsp://IP:8554/Streaming/Channels/101/track1 RTSP/1.0
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
CSeq: 4
Authorization: Digest username="user", realm="admin", nonce="40078a4a68047f67a31d1317fa57dc1c", uri="/Streaming/Channels/101/track1", response="26c0e254d91cd24fc5dbfbe56bba4233"
Session: 00000075
14:42:18.857 TRC [rtsp] client response:
RTSP/1.0 200 OK
Date: Thu Aug 25 17:42:18 2022
Session: 00000075
Transport: RTP/AVP/TCP;ssrc=2234569F;interleaved=0-1
Server: rtsp_demo
Cseq: 4
14:42:18.857 TRC [rtsp] client request:
PLAY rtsp://IP:8554/Streaming/Channels/101 RTSP/1.0
Session: 00000075
CSeq: 5
Authorization: Digest username="user", realm="admin", nonce="40078a4a68047f67a31d1317fa57dc1c", uri="/Streaming/Channels/101", response="17cad323941b5e80d062c61d2967e419"
14:42:18.865 TRC [rtsp] client response:
RTSP/1.0 200 OK
Cseq: 5
Date: Thu Aug 25 17:42:18 2022
Session: 00000075
Server: rtsp_demo
14:42:31.167 TRC [rtsp] client request:
TEARDOWN rtsp://IP:8554/Streaming/Channels/101 RTSP/1.0
CSeq: 6
Authorization: Digest username="user", realm="admin", nonce="40078a4a68047f67a31d1317fa57dc1c", uri="/Streaming/Channels/101", response="a03481aca819de2fb29c28098ec2a580"
Session: 00000075
14:42:31.801 TRC [rtsp] client request:
DESCRIBE rtsp://IP:8554/Streaming/Channels/101 RTSP/1.0
Accept: application/sdp
Require: www.onvif.org/ver20/backchannel
CSeq: 1
14:42:31.816 TRC [rtsp] client response:
RTSP/1.0 401 Unauthorized
Www-Authenticate: Digest realm="admin", nonce="40078a5768047f67a31d1317fa57dc01", stale="FALSE"
Cseq: 1
Date: Thu Aug 25 17:42:31 2022
Server: rtsp_demo
14:42:31.816 TRC [rtsp] client request:
DESCRIBE rtsp://IP:8554/Streaming/Channels/101 RTSP/1.0
Accept: application/sdp
Require: www.onvif.org/ver20/backchannel
CSeq: 2
Authorization: Digest username="user", realm="admin", nonce="40078a5768047f67a31d1317fa57dc01", uri="/Streaming/Channels/101", response="745b9e510bd65354122f9541d08c4503"
14:42:31.825 TRC [rtsp] client response:
RTSP/1.0 200 OK
Content-Type: application/sdp
Cseq: 2
Date: Thu Aug 25 17:42:31 2022
Server: rtsp_demo
Content-Length: 502
v=0
o=- 0 0 IN IP4 0.0.0.0
s=pps_rtsp
t=0 0
a=control:rtsp://IP:8554/Streaming/Channels/101
a=range:npt=0-
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;sprop-parameter-sets=J00AKOdAPAET8uApQUFBfAAAAwAEAAADAKLAgAEk+AAbd1//wKA=,KO48gA==
a=control:rtsp://IP:8554/Streaming/Channels/101/track1
m=audio 0 RTP/AVP 97
c=IN IP4 0.0.0.0
a=rtpmap:97 PCMU/8000/1
a=control:rtsp://IP:8554/Streaming/Channels/101/track2
14:42:31.825 TRC [rtsp] client request:
SETUP rtsp://IP:8554/Streaming/Channels/101/track2 RTSP/1.0
Authorization: Digest username="user", realm="admin", nonce="40078a5768047f67a31d1317fa57dc01", uri="/Streaming/Channels/101/track2", response="071b5a1ca51d55bcf9a680caaf2fa51e"
Transport: RTP/AVP/TCP;unicast;interleaved=2-3
CSeq: 3
14:42:31.838 TRC [rtsp] client response:
RTSP/1.0 200 OK
Date: Thu Aug 25 17:42:31 2022
Session: 00000076
Transport: RTP/AVP/TCP;ssrc=223456A0;interleaved=2-3
Server: rtsp_demo
Cseq: 3
14:42:31.839 TRC [rtsp] client request:
SETUP rtsp://IP:8554/Streaming/Channels/101/track1 RTSP/1.0
Session: 00000076
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
CSeq: 4
Authorization: Digest username="user", realm="admin", nonce="40078a5768047f67a31d1317fa57dc01", uri="/Streaming/Channels/101/track1", response="c567a4143fd44afcc3cf6c7b8f9bef6d"
14:42:31.845 TRC [rtsp] client response:
RTSP/1.0 200 OK
Cseq: 4
Date: Thu Aug 25 17:42:31 2022
Session: 00000076
Transport: RTP/AVP/TCP;ssrc=223456A1;interleaved=0-1
Server: rtsp_demo
14:42:31.846 TRC [rtsp] client request:
PLAY rtsp://IP:8554/Streaming/Channels/101 RTSP/1.0
CSeq: 5
Authorization: Digest username="user", realm="admin", nonce="40078a5768047f67a31d1317fa57dc01", uri="/Streaming/Channels/101", response="a102b83a2ec1cf9db51aa3ef9cf0300d"
Session: 00000076
14:42:31.855 TRC [rtsp] client response:
RTSP/1.0 200 OK
Cseq: 5
Date: Thu Aug 25 17:42:31 2022
Session: 00000076
Server: rtsp_demo
2022/08/25 14:42:42 http: panic serving 192.168.1.152:50929: runtime error: invalid memory address or nil pointer dereference
goroutine 111 [running]:
net/http.(*conn).serve.func1()
net/http/server.go:1825 +0xbf
panic({0x98a580, 0xe33460})
runtime/panic.go:844 +0x258
encoding/json.(*encodeState).marshal.func1()
encoding/json/encode.go:328 +0x6e
panic({0x98a580, 0xe33460})
runtime/panic.go:838 +0x207
encoding/json.(*encodeState).marshal.func1()
encoding/json/encode.go:328 +0x6e
panic({0x98a580, 0xe33460})
runtime/panic.go:838 +0x207
github.com/AlexxIT/go2rtc/pkg/webrtc.(*Conn).remote(0x986960?)
github.com/AlexxIT/go2rtc/pkg/webrtc/conn.go:133 +0xef
github.com/AlexxIT/go2rtc/pkg/webrtc.(*Conn).MarshalJSON(0xc000379ea0)
github.com/AlexxIT/go2rtc/pkg/webrtc/streamer.go:113 +0x7f
encoding/json.marshalerEncoder(0xc000508680, {0x9ee840?, 0xc000379ea0?, 0x40?}, {0x20?, 0x8?})
encoding/json/encode.go:479 +0xbe
encoding/json.(*encodeState).reflectValue(0x979000?, {0x9ee840?, 0xc000379ea0?, 0xc000229120?}, {0xb2?, 0xbd?})
encoding/json/encode.go:360 +0x78
encoding/json.interfaceEncoder(0xc000508680, {0x979000?, 0xc0005e80f0?, 0xc0002291b8?}, {0x3d?, 0xbd?})
encoding/json/encode.go:716 +0xc8
encoding/json.arrayEncoder.encode({0xc0002291c8?}, 0xc000508680, {0x957220?, 0xc00022d788?, 0xc000582000?}, {0x8?, 0x92?})
encoding/json/encode.go:916 +0xb5
encoding/json.sliceEncoder.encode({0xc000206220?}, 0xc000508680, {0x957220?, 0xc00022d788?, 0x957220?}, {0x88?, 0x9?})
encoding/json/encode.go:889 +0x2ca
encoding/json.(*encodeState).reflectValue(0x0?, {0x957220?, 0xc00022d788?, 0x40d627?}, {0x78?, 0x0?})
encoding/json/encode.go:360 +0x78
encoding/json.(*encodeState).marshal(0x18?, {0x957220?, 0xc00022d788?}, {0x0?, 0x0?})
encoding/json/encode.go:332 +0xfa
encoding/json.Marshal({0x957220, 0xc00022d788})
encoding/json/encode.go:161 +0x45
github.com/AlexxIT/go2rtc/cmd/streams.(*Stream).MarshalJSON(0xc0001740c0)
github.com/AlexxIT/go2rtc/cmd/streams/stream.go:156 +0x215
encoding/json.marshalerEncoder(0xc000508580, {0x9dd780?, 0xc0001740c0?, 0x0?}, {0x1?, 0x0?})
encoding/json/encode.go:479 +0xbe
encoding/json.(*encodeState).reflectValue(0x979000?, {0x9dd780?, 0xc0001740c0?, 0xa65fb0?}, {0x58?, 0xd7?})
encoding/json/encode.go:360 +0x78
encoding/json.interfaceEncoder(0xc000508580, {0x979000?, 0xc00054ea10?, 0xc000154a01?}, {0xd0?, 0xe9?})
encoding/json/encode.go:716 +0xc8
encoding/json.mapEncoder.encode({0xc0002061d8?}, 0xc000508580, {0x986960?, 0xc000097bc0?, 0x986960?}, {0x0?, 0x30?})
encoding/json/encode.go:814 +0x583
encoding/json.(*encodeState).reflectValue(0x0?, {0x986960?, 0xc000097bc0?, 0x40d627?}, {0x78?, 0x0?})
encoding/json/encode.go:360 +0x78
encoding/json.(*encodeState).marshal(0x9d0780?, {0x986960?, 0xc000097bc0?}, {0x0?, 0x0?})
encoding/json/encode.go:332 +0xfa
encoding/json.Marshal({0x986960, 0xc000097bc0})
encoding/json/encode.go:161 +0x45
github.com/AlexxIT/go2rtc/cmd/api.streamsHandler({0xafce70, 0xc0000fa1c0}, 0xc000246200)
github.com/AlexxIT/go2rtc/cmd/api/api.go:90 +0x171
net/http.HandlerFunc.ServeHTTP(0x7fb18c433b70?, {0xafce70?, 0xc0000fa1c0?}, 0x40d2c5?)
net/http/server.go:2084 +0x2f
net/http.(*ServeMux).ServeHTTP(0x0?, {0xafce70, 0xc0000fa1c0}, 0xc000246200)
net/http/server.go:2462 +0x149
net/http.serverHandler.ServeHTTP({0xc0000971d0?}, {0xafce70, 0xc0000fa1c0}, 0xc000246200)
net/http/server.go:2916 +0x43b
net/http.(*conn).serve(0xc0000d8000, {0xafd228, 0xc000096600})
net/http/server.go:1966 +0x5d7
created by net/http.(*Server).Serve
net/http/server.go:3071 +0x4db
2022/08/25 14:42:42 http: panic serving 192.168.1.152:50930: runtime error: invalid memory address or nil pointer dereference
goroutine 146 [running]:
net/http.(*conn).serve.func1()
net/http/server.go:1825 +0xbf
panic({0x98a580, 0xe33460})
runtime/panic.go:844 +0x258
encoding/json.(*encodeState).marshal.func1()
encoding/json/encode.go:328 +0x6e
panic({0x98a580, 0xe33460})
runtime/panic.go:838 +0x207
encoding/json.(*encodeState).marshal.func1()
encoding/json/encode.go:328 +0x6e
panic({0x98a580, 0xe33460})
runtime/panic.go:838 +0x207
github.com/AlexxIT/go2rtc/pkg/webrtc.(*Conn).remote(0x986960?)
github.com/AlexxIT/go2rtc/pkg/webrtc/conn.go:133 +0xef
github.com/AlexxIT/go2rtc/pkg/webrtc.(*Conn).MarshalJSON(0xc000379ea0)
github.com/AlexxIT/go2rtc/pkg/webrtc/streamer.go:113 +0x7f
encoding/json.marshalerEncoder(0xc000202400, {0x9ee840?, 0xc000379ea0?, 0x40?}, {0x20?, 0x8?})
encoding/json/encode.go:479 +0xbe
encoding/json.(*encodeState).reflectValue(0x979000?, {0x9ee840?, 0xc000379ea0?, 0xc000225120?}, {0xb2?, 0xbd?})
encoding/json/encode.go:360 +0x78
encoding/json.interfaceEncoder(0xc000202400, {0x979000?, 0xc00052a010?, 0x403de9?}, {0x1b?, 0x6a?})
encoding/json/encode.go:716 +0xc8
encoding/json.arrayEncoder.encode({0x41554cee9531983d?}, 0xc000202400, {0x957220?, 0xc00000c858?, 0x403bb2?}, {0xf0?, 0x51?})
encoding/json/encode.go:916 +0xb5
encoding/json.sliceEncoder.encode({0xc000202400?}, 0xc000202400, {0x957220?, 0xc00000c858?, 0x957220?}, {0x0?, 0x1?})
encoding/json/encode.go:889 +0x2ca
encoding/json.(*encodeState).reflectValue(0x0?, {0x957220?, 0xc00000c858?, 0x40d627?}, {0x78?, 0x0?})
encoding/json/encode.go:360 +0x78
encoding/json.(*encodeState).marshal(0x18?, {0x957220?, 0xc00000c858?}, {0x0?, 0x0?})
encoding/json/encode.go:332 +0xfa
encoding/json.Marshal({0x957220, 0xc00000c858})
encoding/json/encode.go:161 +0x45
github.com/AlexxIT/go2rtc/cmd/streams.(*Stream).MarshalJSON(0xc0001740c0)
github.com/AlexxIT/go2rtc/cmd/streams/stream.go:156 +0x215
encoding/json.marshalerEncoder(0xc000202280, {0x9dd780?, 0xc0001740c0?, 0x0?}, {0x1?, 0x0?})
encoding/json/encode.go:479 +0xbe
encoding/json.(*encodeState).reflectValue(0x979000?, {0x9dd780?, 0xc0001740c0?, 0xa65fb0?}, {0x40?, 0xc8?})
encoding/json/encode.go:360 +0x78
encoding/json.interfaceEncoder(0xc000202280, {0x979000?, 0xc000525f50?, 0x1?}, {0xe9?, 0x3d?})
encoding/json/encode.go:716 +0xc8
encoding/json.mapEncoder.encode({0xc000202280?}, 0xc000202280, {0x986960?, 0xc00059a570?, 0x986960?}, {0x1c?, 0x0?})
encoding/json/encode.go:814 +0x583
encoding/json.(*encodeState).reflectValue(0x0?, {0x986960?, 0xc00059a570?, 0x40d627?}, {0x78?, 0x0?})
encoding/json/encode.go:360 +0x78
encoding/json.(*encodeState).marshal(0x9d0780?, {0x986960?, 0xc00059a570?}, {0x0?, 0x0?})
encoding/json/encode.go:332 +0xfa
encoding/json.Marshal({0x986960, 0xc00059a570})
encoding/json/encode.go:161 +0x45
github.com/AlexxIT/go2rtc/cmd/api.streamsHandler({0xafce70, 0xc0001f60e0}, 0xc000278100)
github.com/AlexxIT/go2rtc/cmd/api/api.go:90 +0x171
net/http.HandlerFunc.ServeHTTP(0x7fb18c433b70?, {0xafce70?, 0xc0001f60e0?}, 0x40d2c5?)
net/http/server.go:2084 +0x2f
net/http.(*ServeMux).ServeHTTP(0x0?, {0xafce70, 0xc0001f60e0}, 0xc000278100)
net/http/server.go:2462 +0x149
net/http.serverHandler.ServeHTTP({0xc00059a450?}, {0xafce70, 0xc0001f60e0}, 0xc000278100)
net/http/server.go:2916 +0x43b
net/http.(*conn).serve(0xc0000d80a0, {0xafd228, 0xc000096600})
net/http/server.go:1966 +0x5d7
created by net/http.(*Server).Serve
net/http/server.go:3071 +0x4db