go2rtc icon indicating copy to clipboard operation
go2rtc copied to clipboard

Vikylin YC2367C-ISU-28 2-Way audio backchannel

Open ronluna opened this issue 2 years ago • 20 comments

I'm trying to get the backchannel working on this 2-way audio camera from vikylin.

In order to get the stream with video and audio I had to disable the backchannel otherwise go2rtc will complain and show an i/o timeout error in the logs.

They advertise this camera as compatible with Hikvision and Dahua NVRs so the camera also responds to the following rtsp url streams from both manufacturer:

rtsp://camera_ip:port/cam/realmonitor?channel=0&subtype=0&unicast=true&proto=Onvif#backchannel=0 rtsp://camera_ip:port/Streaming/Channels/101/transportmode=unicast&profile&Profile_1#backchannel=0

although their official documentation points at the rtsp url below as the official one.

rtsp://user:pwd@camera_ip:port/stream0#backchannel=1

currently the configuration.yml looks like this

streams:
  cam_1:
    - rtsp://user:pwd@camera_ip:port/stream0#backchannel=1

The above confir works fine for video and audio but no audio can be sent to the camera as the backchannel is disabled.

The 2-way audio feature work just fine when when using their app "videolink"

Below is the trace log when enabling the backchannel:


[90m15:58:40.311[0m [35mTRC[0m [rtsp] client response:
RTSP/1.0 401 Unauthorized
Cseq: 1
Www-Authenticate: Basic realm="/"


[90m15:58:40.311[0m [35mTRC[0m [rtsp] client request:
DESCRIBE rtsp://10.1.8.125:554/stream0 RTSP/1.0
Accept: application/sdp
Require: www.onvif.org/ver20/backchannel
User-Agent: go2rtc/1.8.4
CSeq: 2
Authorization: Basic YWRtaW46MTIzNDU2


[90m15:58:40.326[0m [35mTRC[0m [rtsp] client response:
RTSP/1.0 200 OK
Content-Type: application/sdp
Content-Length: 830
Content-Base: rtsp://rtsp://10.1.8.125:554/stream0/
Cseq: 2

v=0
o=- 1109162014219182 1109162014219192 IN IP4 x.y.z.w
s=RTSP/RTP stream from icamra ipc
e=NONE
c=IN IP4 0.0.0.0
a=tool:LIVE555 Streaming Media v2011.05.25 [email protected]
t=0 0
a=range:npt=0-
a=control:*
m=video 0 RTP/AVP 96
a=rtpmap:96 H264/90000
a=control:trackID=1
a=fmtp:96 profile-level-id=640028;packetization-mode=0;sprop-parameter-sets=Z2QAKKzSAeAIn5YQAAA+kAAMOCBA,aOqPLA==;config=0000000167640028acd201e0089f961000003e90000c3820400000000168ea8f2c
a=x-dimensions: 1920, 1080
a=x-framerate: 25
m=audio 0 RTP/AVP 0
a=rtpmap:0 PCMU/8000
a=control:trackID=2
a=Media_header:MEDIAINFO=494D4B48010100000400010010710110401F000000FA000000000000000000000000000000000000;
a=appversion:1.0
m=audio 0 RTP/AVP 0
a=control:rtsp://rtsp://10.1.8.125:554/stream0/backchannel
a=rtpmap:0 PCMU/8000
a=sendonly

[90m15:58:40.326[0m [35mTRC[0m [rtsp] client request:
SETUP rtsp://10.1.8.125:554/stream0/trackID=1 RTSP/1.0
Authorization: Basic YWRtaW46MTIzNDU2
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
CSeq: 3


[90m15:58:40.328[0m [35mTRC[0m [rtsp] client response:
RTSP/1.0 200 OK
Cseq: 3
Session: 565075292d
Transport: RTP/AVP/TCP;unicast;interleaved=6-7


[90m15:58:40.328[0m [35mTRC[0m [rtsp] client request:
SETUP rtsp://10.1.8.125:554/stream0/trackID=2 RTSP/1.0
Transport: RTP/AVP/TCP;unicast;interleaved=2-3
CSeq: 4
Authorization: Basic YWRtaW46MTIzNDU2
Session: 565075292d


[90m15:58:40.331[0m [35mTRC[0m [rtsp] client response:
RTSP/1.0 200 OK
Cseq: 4
Session: 565075292d
Transport: RTP/AVP/TCP;unicast;interleaved=6-7


[90m15:58:40.331[0m [35mTRC[0m [rtsp] client request:
PLAY rtsp://10.1.8.125:554/stream0/ RTSP/1.0
CSeq: 5
Authorization: Basic YWRtaW46MTIzNDU2
Session: 565075292d


[90m15:58:40.332[0m [35mTRC[0m [rtsp] client response:
RTSP/1.0 200 OK
Cseq: 5
Session: 565075292d
Range: npt=0.000-
Rtp-Info: 


[90m15:58:43.233[0m [33mDBG[0m [streams] stop producer url=rtsp://user:[email protected]:554/stream0#backchannel=1
[90m15:58:43.233[0m [35mTRC[0m [rtsp] client request:
TEARDOWN rtsp://10.1.8.125:554/stream0/ RTSP/1.0
Authorization: Basic YWRtaW46MTIzNDU2
Session: 565075292d
CSeq: 6


[90m15:58:43.233[0m [35mTRC[0m [streams] stop reconnect url=rtsp://user:[email protected]:554/stream0#backchannel=1



So I'm wondering if something can be done in order to get backchannel working?

ronluna avatar Dec 15 '23 21:12 ronluna

Are you sure you have HTTPS and access to microphone in your browser? I can see two way audio support in your logs.

AlexxIT avatar Dec 30 '23 18:12 AlexxIT

I'm trying to access the stream using the HA go2rtc addon. HA is fully running over https/ssl with a valid certificate. I'm or was under the impression that when enabling the backchannel the stream would remain accesible over http just without microphone access. But by your comments I'm fully in doubt...

Is it require no matter how the stream is being access (through HA under ssl) to have TLS enabled (including the tls certificate) on the go2rtc config?

tls_listen: ":443" # default "", enable HTTPS server tls_cert: | # default "", PEM-encoded fullchain certificate for HTTPS -----BEGIN CERTIFICATE----- ... -----END CERTIFICATE----- tls_key: | # default "", PEM-encoded private key for HTTPS -----BEGIN PRIVATE KEY----- ... -----END PRIVATE KEY-----

ronluna avatar Dec 30 '23 19:12 ronluna

I just enable ssl on go2rtc and now the config looks like this:

api:
  listen: ":1984"    
  tls_listen: ":8444"
  tls_cert: /ssl/fullchain.pem
  tls_key: /ssl/privkey.pem

webrtc:
  candidates:
    - xx.xx.xx.xx:8555  # if you have dynamic public IP-address

streams:
  cam_01:
    - rtsp://admin:pass@camera_ip:554/stream0#backchannel=1
  #cam_02:
  #      - rtsp://admin:pass@camera_ip:554/stream0#backchannel=0
log:
  format: ""
  level: "trace"    

But I get the same results (Black page) when trying to access the webrtc stream using:

https://go2rtc_ip:8444/stream.html?src=cam_01&mode=webrtc or https://go2rtc_ip:8444/webrtc.html?src=cam_01&media=video+audio+microphone (Allowing mic access) image

VLC is unable to open stream either using:

rtsp://go2rtc_ip:8554/cam_01

The logs shows:

Authorization: Basic YWRtaW46MTIzNDU2


15:31:22.574 TRC [rtsp] client response:
RTSP/1.0 200 OK
Cseq: 6
Session: 1763763105d
Range: npt=0.000-
Rtp-Info: 


15:31:22.581 TRC [webrtc] answer
v=0
o=- 5426115211476960135 1703968282 IN IP4 0.0.0.0
s=-
t=0 0
a=fingerprint:sha-256 67:97:17:57:08:29:F6:EB:16:53:B2:7B:60:E0:B5:82:2C:D9:D1:84:BB:C4:E6:9D:5E:48:6B:AB:E7:74:C8:68
a=extmap-allow-mixed
a=group:BUNDLE 0 1 2
m=audio 9 UDP/TLS/RTP/SAVPF 0
c=IN IP4 0.0.0.0
a=setup:active
a=mid:0
a=ice-ufrag:mwVWbhmxALVeidGT
a=ice-pwd:iHaJXEddWMJkeVCvgXdkJhglQKWXQqSh
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:0 PCMU/8000
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=recvonly
m=video 9 UDP/TLS/RTP/SAVPF 102 106 112
c=IN IP4 0.0.0.0
a=setup:active
a=mid:1
a=ice-ufrag:mwVWbhmxALVeidGT
a=ice-pwd:iHaJXEddWMJkeVCvgXdkJhglQKWXQqSh
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:102 H264/90000
a=fmtp:102 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f
a=rtcp-fb:102 goog-remb 
a=rtcp-fb:102 transport-cc 
a=rtcp-fb:102 ccm fir
a=rtcp-fb:102 nack 
a=rtcp-fb:102 nack pli
a=rtpmap:106 H264/90000
a=fmtp:106 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f
a=rtcp-fb:106 goog-remb 
a=rtcp-fb:106 transport-cc 
a=rtcp-fb:106 ccm fir
a=rtcp-fb:106 nack 
a=rtcp-fb:106 nack pli
a=rtpmap:112 H264/90000
a=fmtp:112 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=64001f
a=rtcp-fb:112 goog-remb 
a=rtcp-fb:112 transport-cc 
a=rtcp-fb:112 ccm fir
a=rtcp-fb:112 nack 
a=rtcp-fb:112 nack pli
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=ssrc:2664124727 cname:go2rtc
a=ssrc:2664124727 msid:go2rtc go2rtc-video
a=ssrc:2664124727 mslabel:go2rtc
a=ssrc:2664124727 label:go2rtc-video
a=msid:go2rtc go2rtc-video
a=sendonly
m=audio 9 UDP/TLS/RTP/SAVPF 111 0 8
c=IN IP4 0.0.0.0
a=setup:active
a=mid:2
a=ice-ufrag:mwVWbhmxALVeidGT
a=ice-pwd:iHaJXEddWMJkeVCvgXdkJhglQKWXQqSh
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:111 opus/48000/2
a=fmtp:111 minptime=10;useinbandfec=1
a=rtcp-fb:111 transport-cc 
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=ssrc:4093143984 cname:go2rtc
a=ssrc:4093143984 msid:go2rtc go2rtc-audio
a=ssrc:4093143984 mslabel:go2rtc
a=ssrc:4093143984 label:go2rtc-audio
a=msid:go2rtc go2rtc-audio
a=sendonly

15:31:22.582 TRC [webrtc] config candidate="candidate:1643801117 1 tcp 1671430142 99.89.127.26 8555 typ host tcptype passive"
15:31:22.582 TRC [webrtc] local  candidate="candidate:2739947963 1 udp 2130706431 10.1.8.23 47855 typ host"
15:31:22.582 TRC [webrtc] local  candidate="candidate:514013275 1 tcp 1671430143 10.1.8.23 8555 typ host tcptype passive"
15:31:22.583 TRC [webrtc] local  candidate="candidate:2615538414 1 udp 2130706431 2600:1700:4198:bf:c18a:8a82:8b7b:89fd 49448 typ host"
15:31:22.583 TRC [webrtc] local  candidate="candidate:639009550 1 tcp 1671430143 2600:1700:4198:bf:c18a:8a82:8b7b:89fd 8555 typ host tcptype passive"
15:31:22.583 TRC [webrtc] local  candidate="candidate:2528831381 1 tcp 1671430143 2600:1700:4198:bf:e43:9fdf:a67e:7393 8555 typ host tcptype passive"
15:31:22.584 TRC [webrtc] local  candidate="candidate:726242933 1 udp 2130706431 2600:1700:4198:bf:e43:9fdf:a67e:7393 59911 typ host"
15:31:22.584 TRC [webrtc] local  candidate="candidate:1424206765 1 udp 2130706431 172.22.159.43 48556 typ host"
15:31:22.585 TRC [webrtc] local  candidate="candidate:3910195789 1 tcp 1671430143 172.22.159.43 8555 typ host tcptype passive"
15:31:22.586 TRC [webrtc] local  candidate="candidate:1346180419 1 udp 2130706431 fd9b:ee89:41b5:5aba:eb99:936a:28a7:2535 46289 typ host"
15:31:22.586 TRC [webrtc] local  candidate="candidate:3989726371 1 tcp 1671430143 fd9b:ee89:41b5:5aba:eb99:936a:28a7:2535 8555 typ host tcptype passive"
15:31:22.601 TRC [webrtc] local  candidate="candidate:3848256314 1 udp 1694498815 99.89.127.26 33903 typ srflx raddr 0.0.0.0 rport 43449"
15:31:22.606 TRC [webrtc] local  candidate="candidate:2822229221 1 udp 1694498815 2600:1700:4198:b0::49 22583 typ srflx raddr :: rport 47609"
15:31:43.182 TRC [rtsp] client request:
DESCRIBE rtsp://10.1.8.83:554/stream0 RTSP/1.0
User-Agent: go2rtc/1.8.4
CSeq: 2
Authorization: Basic YWRtaW46MTIzNDU2
Accept: application/sdp
Require: www.onvif.org/ver20/backchannel


15:31:43.229 TRC [rtsp] client response:
RTSP/1.0 200 OK
Content-Base: rtsp://rtsp://10.1.8.83:554/stream0/
Cseq: 2
Content-Type: application/sdp
Content-Length: 827

v=0
o=- 1109162014219182 1109162014219192 IN IP4 x.y.z.w
s=RTSP/RTP stream from icamra ipc
e=NONE
c=IN IP4 0.0.0.0
a=tool:LIVE555 Streaming Media v2011.05.25 [email protected]
t=0 0
a=range:npt=0-
a=control:*
m=video 0 RTP/AVP 96
a=rtpmap:96 H264/90000
a=control:trackID=1
a=fmtp:96 profile-level-id=4D0032;packetization-mode=0;sprop-parameter-sets=Z00AMukAeAET8sIAAAfSAAE40Ag=,aOqPIA==;config=00000001674d0032e900780113f2c2000007d2000138d0080000000168ea8f20
a=x-dimensions: 3840, 1080
a=x-framerate: 20
m=audio 0 RTP/AVP 0
a=rtpmap:0 PCMU/8000
a=control:trackID=2
a=Media_header:MEDIAINFO=494D4B48010100000400010010710110401F000000FA000000000000000000000000000000000000;
a=appversion:1.0
m=audio 0 RTP/AVP 0
a=control:rtsp://rtsp://10.1.8.83:554/stream0/backchannel
a=rtpmap:0 PCMU/8000
a=sendonly

15:31:43.229 TRC [rtsp] client request:
SETUP rtsp://10.1.8.83:554/stream0/trackID=1 RTSP/1.0
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
CSeq: 3
Authorization: Basic YWRtaW46MTIzNDU2


15:31:43.230 TRC [rtsp] client response:
RTSP/1.0 200 OK
Transport: RTP/AVP/TCP;unicast;interleaved=6-7
Cseq: 3
Session: 1138854805d


15:31:43.231 TRC [rtsp] client request:
SETUP rtsp://10.1.8.83:554/stream0/trackID=2 RTSP/1.0
CSeq: 4
Authorization: Basic YWRtaW46MTIzNDU2
Session: 1138854805d
Transport: RTP/AVP/TCP;unicast;interleaved=2-3


15:31:43.276 TRC [rtsp] client response:
RTSP/1.0 200 OK
Cseq: 4
Session: 1138854805d
Transport: RTP/AVP/TCP;unicast;interleaved=6-7


15:31:43.276 TRC [rtsp] client request:
SETUP rtsp://10.1.8.83:554/stream0/backchannel RTSP/1.0
CSeq: 5
Authorization: Basic YWRtaW46MTIzNDU2
Session: 1138854805d
Transport: RTP/AVP/TCP;unicast;interleaved=4-5


15:31:43.326 TRC [rtsp] client response:
RTSP/1.0 200 OK
Cseq: 5
Session: 1138854805d
Transport: RTP/AVP/TCP;unicast;interleaved=6-7


15:31:43.326 TRC [rtsp] client request:
PLAY rtsp://10.1.8.83:554/stream0/ RTSP/1.0
CSeq: 6
Authorization: Basic YWRtaW46MTIzNDU2
Session: 1138854805d


15:31:43.370 TRC [rtsp] client response:
RTSP/1.0 200 OK
Range: npt=0.000-
Rtp-Info: 
Cseq: 6
Session: 1138854805d
{
  "producers": [
    {
      "type": "RTSP active producer",
      "url": "rtsp://10.1.8.83:554/stream0/",
      "remote_addr": "10.1.8.83:554",
      "user_agent": "go2rtc/1.8.4",
      "sdp": "v=0\r\no=- 1109162014219182 1109162014219192 IN IP4 x.y.z.w\r\ns=RTSP/RTP stream from icamra ipc\r\ne=NONE\r\nc=IN IP4 0.0.0.0\r\na=tool:LIVE555 Streaming Media v2011.05.25 [email protected]\r\nt=0 0\r\na=range:npt=0-\r\na=control:*\r\nm=video 0 RTP/AVP 96\r\na=rtpmap:96 H264/90000\r\na=control:trackID=1\r\na=fmtp:96 profile-level-id=4D0032;packetization-mode=0;sprop-parameter-sets=Z00AMukAeAET8sIAAAfSAAE40Ag=,aOqPIA==;config=00000001674d0032e900780113f2c2000007d2000138d0080000000168ea8f20\r\na=x-dimensions: 3840, 1080\r\na=x-framerate: 20\r\nm=audio 0 RTP/AVP 0\r\na=rtpmap:0 PCMU/8000\r\na=control:trackID=2\r\na=Media_header:MEDIAINFO=494D4B48010100000400010010710110401F000000FA000000000000000000000000000000000000;\r\na=appversion:1.0\r\nm=audio 0 RTP/AVP 0\r\na=control:rtsp://rtsp://10.1.8.83:554/stream0/backchannel\r\na=rtpmap:0 PCMU/8000\r\na=sendonly\r\n",
      "medias": [
        "video, recvonly, H.264 Main 5.0",
        "audio, recvonly, PCMU/8000",
        "audio, sendonly, PCMU/8000"
      ],
      "receivers": [
        "96 H264, bytes=0, senders=3",
        "0 PCMU/8000, bytes=0, senders=1"
      ]
    },
    {
      "type": "WebRTC/WebSocket async passive producer",
      "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
    }
  ],
  "consumers": [
    {
      "type": "MP4/HTTP active consumer",
      "remote_addr": "[2600:1700:4198:bf:e979:484a:4ba1:311a]:60209",
      "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
      "medias": [
        "video, sendonly, H264, H265",
        "audio, sendonly, MPEG4-GENERIC"
      ],
      "senders": [
        "96 H264, bytes=0, receivers=1"
      ]
    },
    {
      "medias": [
        "video, sendonly, H264, H265"
      ],
      "senders": [
        "96 H264, bytes=0, receivers=1"
      ]
    },
    {
      "type": "MP4/HTTP active consumer",
      "remote_addr": "[2600:1700:4198:bf:e979:484a:4ba1:311a]:60209",
      "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
      "medias": [
        "video, sendonly, H264, H265",
        "audio, sendonly, MPEG4-GENERIC, PCMA, PCMU, L16, PCML, OPUS, MPA"
      ],
      "senders": [
        "96 H264, bytes=0, receivers=1",
        "0 FLAC/8000, bytes=0, receivers=1"
      ]
    }
  ]
}

ronluna avatar Dec 30 '23 19:12 ronluna

Has this link never worked for you rtsp://user:pwd@camera_ip:port/stream0 ? Have you tried it in the VLC? Have you tried it with backchannel=0 ?

AlexxIT avatar Dec 30 '23 20:12 AlexxIT

Yes, this works fine: rtsp://user:pwd@camera_ip:port/stream0backchannel=0 (Video and incoming audio) (no 2-way audio)

Although I'm trying to get 2-way audio working with: rtsp://user:pwd@camera_ip:port/stream0 or rtsp://user:pwd@camera_ip:port/stream0backchannel=1

But none of them work. Even after enabling ssl and gave permission to the microphone not even VLC is able to open the stream... just a black page the loading spinner.

I've updated my previous comment showing the latest trace logs (after enabling ssl and mic).

ronluna avatar Dec 30 '23 20:12 ronluna

You have very strange stream info in the previous message. It not related to your config.

AlexxIT avatar Dec 31 '23 03:12 AlexxIT

This is what the go2rtc logs are showing when trying to access the stream but returns a black page

Config:

api:
  listen: ":1984"    # default ":1984", HTTP API port ("" - disabled)
  tls_listen: ":8444" # default "", enable HTTPS server
  tls_cert: /ssl/fullchain.pem
  tls_key: /ssl/privkey.pem

streams:
  cam_01:
    - rtsp://admin:[email protected]:554/stream0
log:
  format: ""
  level: "trace"  

Info:

{
  "producers": [
    {
      "type": "RTSP active producer",
      "url": "rtsp://10.1.8.83:554/stream0/",
      "remote_addr": "10.1.8.83:554",
      "user_agent": "go2rtc/1.8.4",
      "sdp": "v=0\r\no=- 1109162014219182 1109162014219192 IN IP4 x.y.z.w\r\ns=RTSP/RTP stream from icamra ipc\r\ne=NONE\r\nc=IN IP4 0.0.0.0\r\na=tool:LIVE555 Streaming Media v2011.05.25 [email protected]\r\nt=0 0\r\na=range:npt=0-\r\na=control:*\r\nm=video 0 RTP/AVP 96\r\na=rtpmap:96 H264/90000\r\na=control:trackID=1\r\na=fmtp:96 profile-level-id=4D0032;packetization-mode=0;sprop-parameter-sets=Z00AMukAeAET8sIAAAfSAAE40Ag=,aOqPIA==;config=00000001674d0032e900780113f2c2000007d2000138d0080000000168ea8f20\r\na=x-dimensions: 3840, 1080\r\na=x-framerate: 20\r\nm=audio 0 RTP/AVP 0\r\na=rtpmap:0 PCMU/8000\r\na=control:trackID=2\r\na=Media_header:MEDIAINFO=494D4B48010100000400010010710110401F000000FA000000000000000000000000000000000000;\r\na=appversion:1.0\r\nm=audio 0 RTP/AVP 0\r\na=control:rtsp://rtsp://10.1.8.83:554/stream0/backchannel\r\na=rtpmap:0 PCMU/8000\r\na=sendonly\r\n",
      "medias": [
        "video, recvonly, H.264 Main 5.0",
        "audio, recvonly, PCMU/8000",
        "audio, sendonly, PCMU/8000"
      ],
      "receivers": [
        "96 H264, bytes=0, senders=1",
        "0 PCMU/8000, bytes=0, senders=1"
      ],
      "senders": [
        "0 PCMU/8000, bytes=10880, receivers=1"
      ],
      "send": 11792
    }
  ],
  "consumers": [
    {
      "type": "WebRTC/WebSocket async passive consumer",
      "remote_addr": "udp6 host [2600:1700:4198:bf:e979:484a:4ba1:311a]:64313",
      "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
      "medias": [
        "video, sendonly, VP8, RTX, VP9, H264, AV1, RED, ULPFEC, FLEXFEC-03",
        "audio, recvonly, OPUS/48000/2, RED/48000/2, G722/8000, PCMU/8000, PCMA/8000, CN/8000, TELEPHONE-EVENT/48000, TELEPHONE-EVENT/8000",
        "audio, sendonly, OPUS/48000/2, RED/48000/2, G722/8000, PCMU/8000, PCMA/8000, CN/8000, TELEPHONE-EVENT/48000, TELEPHONE-EVENT/8000, L16, PCML"
      ],
      "receivers": [
        "0 PCMU/8000, bytes=10880, senders=1"
      ],
      "senders": [
        "102 H264, bytes=0, receivers=1",
        "0 PCMU/8000, bytes=0, receivers=1"
      ],
      "recv": 12240
    }
  ]
}

trace logs (This repeats over and over while the browser tries to access the stream using:

https://go2rtc_ip:8444/webrtc.html?src=cam_01&media=video+audio+microphone

09:13:29.864 TRC [rtsp] client request:
DESCRIBE rtsp://10.1.8.83:554/stream0 RTSP/1.0
Authorization: Basic YWRtaW46MTIzNDU2
Accept: application/sdp
Require: www.onvif.org/ver20/backchannel
User-Agent: go2rtc/1.8.4
CSeq: 2


09:13:29.915 TRC [rtsp] client response:
RTSP/1.0 200 OK
Cseq: 2
Content-Type: application/sdp
Content-Length: 827
Content-Base: rtsp://rtsp://10.1.8.83:554/stream0/

v=0
o=- 1109162014219182 1109162014219192 IN IP4 x.y.z.w
s=RTSP/RTP stream from icamra ipc
e=NONE
c=IN IP4 0.0.0.0
a=tool:LIVE555 Streaming Media v2011.05.25 [email protected]
t=0 0
a=range:npt=0-
a=control:*
m=video 0 RTP/AVP 96
a=rtpmap:96 H264/90000
a=control:trackID=1
a=fmtp:96 profile-level-id=4D0032;packetization-mode=0;sprop-parameter-sets=Z00AMukAeAET8sIAAAfSAAE40Ag=,aOqPIA==;config=00000001674d0032e900780113f2c2000007d2000138d0080000000168ea8f20
a=x-dimensions: 3840, 1080
a=x-framerate: 20
m=audio 0 RTP/AVP 0
a=rtpmap:0 PCMU/8000
a=control:trackID=2
a=Media_header:MEDIAINFO=494D4B48010100000400010010710110401F000000FA000000000000000000000000000000000000;
a=appversion:1.0
m=audio 0 RTP/AVP 0
a=control:rtsp://rtsp://10.1.8.83:554/stream0/backchannel
a=rtpmap:0 PCMU/8000
a=sendonly

09:13:29.915 TRC [rtsp] client request:
SETUP rtsp://10.1.8.83:554/stream0/trackID=1 RTSP/1.0
Transport: RTP/AVP/TCP;unicast;interleaved=0-1
CSeq: 3
Authorization: Basic YWRtaW46MTIzNDU2


09:13:29.960 TRC [rtsp] client response:
RTSP/1.0 200 OK
Cseq: 3
Session: 2048860833d
Transport: RTP/AVP/TCP;unicast;interleaved=6-7


09:13:29.960 TRC [rtsp] client request:
SETUP rtsp://10.1.8.83:554/stream0/trackID=2 RTSP/1.0
CSeq: 4
Authorization: Basic YWRtaW46MTIzNDU2
Session: 2048860833d
Transport: RTP/AVP/TCP;unicast;interleaved=2-3


09:13:30.016 TRC [rtsp] client response:
RTSP/1.0 200 OK
Cseq: 4
Session: 2048860833d
Transport: RTP/AVP/TCP;unicast;interleaved=6-7


09:13:30.016 TRC [rtsp] client request:
SETUP rtsp://10.1.8.83:554/stream0/backchannel RTSP/1.0
CSeq: 5
Authorization: Basic YWRtaW46MTIzNDU2
Session: 2048860833d
Transport: RTP/AVP/TCP;unicast;interleaved=4-5


09:13:30.065 TRC [rtsp] client response:
RTSP/1.0 200 OK
Cseq: 5
Session: 2048860833d
Transport: RTP/AVP/TCP;unicast;interleaved=6-7


09:13:30.065 TRC [rtsp] client request:
PLAY rtsp://10.1.8.83:554/stream0/ RTSP/1.0
Session: 2048860833d
CSeq: 6
Authorization: Basic YWRtaW46MTIzNDU2


09:13:30.112 TRC [rtsp] client response:
RTSP/1.0 200 OK
Range: npt=0.000-
Rtp-Info: 
Cseq: 6
Session: 2048860833d

No edit on this post... Hopefully this could share more info...

ronluna avatar Dec 31 '23 14:12 ronluna

Well. I can see two way connection in your logs. But camera didn't send any data. I think it's problem with camera firmware. Some unknown brand...

Original app may use some proprietary two way proto.

AlexxIT avatar Dec 31 '23 14:12 AlexxIT

I have a question,

09:31:32.579 TRC [rtsp] client response:
RTSP/1.0 200 OK
Cseq: 2
Content-Type: application/sdp
Content-Length: 827
Content-Base: rtsp://rtsp://10.1.8.83:554/stream0/
a=control:rtsp://rtsp://10.1.8.125:554/stream0/backchannel
a=rtpmap:0 PCMU/8000
a=sendonly

Could it be that double rtsp:// prefix that does not allow the proper connection? I don't see that double rtsp trailing when backchannel is disable or other cameras without a mic.

ronluna avatar Dec 31 '23 14:12 ronluna

Who knows. Your camera sends this data. I can try to fix this moment. No any hope that this helps.

AlexxIT avatar Dec 31 '23 14:12 AlexxIT

worth a shot... right? 😄 Seems like a good camera at a very good price... If it works I could test the other models they have and share it as a supported 2-way audio camera.

ronluna avatar Dec 31 '23 14:12 ronluna

Just a quick follow up to revive this and see if there was a chance to tweak the double rtsp trailing ?

ronluna avatar Jan 18 '24 07:01 ronluna

Check latest dev version https://github.com/AlexxIT/go2rtc?tab=readme-ov-file#go2rtc-dev-version

AlexxIT avatar Jan 18 '24 14:01 AlexxIT

Just tried it but no luck....Not sure if the latest build condition to capture the double rtsp is not met thus keeping the double rtsp in there?

regardless... thanks a lot for giving it a shot!

2024-01-19 11:12:11.013847483  size=N/A time=00:11:43.01 bitrate=N/A speed=   1x    
size=N/A time=00:05:32.97 bitrate=N/A speed=   1x    
size=N/A time=00:11:43.53 bitrate=N/A speed=   1x    
size=N/A time=00:05:33.49 bitrate=N/A speed=   1x    
size=N/A time=00:11:44.07 bitrate=N/A speed=   1x    
size=N/A time=00:05:33.97 bitrate=N/A speed=   1x    
size=N/A time=00:11:44.57 bitrate=N/A speed=   1x    
size=N/A time=00:05:34.49 bitrate=N/A speed=   1x    
size=N/A time=00:11:45.07 bitrate=N/A speed=   1x    
size=N/A time=00:05:35.05 bitrate=N/A speed=   1x    
size=N/A time=00:11:45.57 bitrate=N/A speed=   1x    
size=N/A time=00:05:35.53 bitrate=N/A speed=   1x    
size=N/A time=00:11:46.09 bitrate=N/A speed=   1x    
11:12:11.013 TRC [rtsp] server request:
2024-01-19 11:12:11.013856994  TEARDOWN rtsp://127.0.0.1:8554/Front_South_Corner_to_North_10_1_8_83 RTSP/1.0
2024-01-19 11:12:11.013858797  Cseq: 5
2024-01-19 11:12:11.013860635  User-Agent: FFmpeg Frigate/0.13.0-49814b3
2024-01-19 11:12:11.013862200  Session: 71550882
2024-01-19 11:12:11.013863615  
2024-01-19 11:12:11.013865010  
2024-01-19 11:12:11.013903796  11:12:11.013 DBG [rtsp] handle=EOF
2024-01-19 11:12:11.013988750  11:12:11.013 DBG [rtsp] disconnect stream=Front_South_Corner_to_North_10_1_8_83
2024-01-19 11:12:11.166939274  size=N/A time=00:05:36.05 bitrate=N/A speed=   1x    
[libopus @ 0x55ec5fe06fc0] Queue input is backward in time
2024-01-19 11:12:11.806144775  size=N/A time=00:11:46.61 bitrate=N/A speed=   1x    
size=N/A time=00:05:36.53 bitrate=N/A speed=   1x    
[libopus @ 0x55ec5fe06fc0] Queue input is backward in time
2024-01-19 11:12:12.441774785  size=N/A time=00:11:47.11 bitrate=N/A speed=   1x    
size=N/A time=00:05:37.05 bitrate=N/A speed=   1x    
[libopus @ 0x55ec5fe06fc0] Queue input is backward in time
2024-01-19 11:12:12.736078726  size=N/A time=00:11:47.61 bitrate=N/A speed=   1x    
size=N/A time=00:05:37.69 bitrate=N/A speed=   1x    
11:12:12.735 WRN github.com/AlexxIT/go2rtc/internal/streams/producer.go:171 > error="read tcp 10.1.8.26:34228->10.1.8.83:554: i/o timeout" url=rtsp://admin:[email protected]:554/stream0#backchannel=1#video=h264#width=1920#audio=copy#audio=aac#audio=opus
2024-01-19 11:12:12.736102496  11:12:12.736 DBG [streams] retry=0 to url=rtsp://admin:[email protected]:554/stream0#backchannel=1#video=h264#width=1920#audio=copy#audio=aac#audio=opus
2024-01-19 11:12:12.741512441  11:12:12.741 TRC [rtsp] client request:
2024-01-19 11:12:12.741516468  DESCRIBE rtsp://10.1.8.83:554/stream0 RTSP/1.0
2024-01-19 11:12:12.741518561  Accept: application/sdp
2024-01-19 11:12:12.741520608  Require: www.onvif.org/ver20/backchannel
2024-01-19 11:12:12.741522340  User-Agent: go2rtc/1.8.5
2024-01-19 11:12:12.741523947  CSeq: 1
2024-01-19 11:12:12.741525514  
2024-01-19 11:12:12.741526990  
2024-01-19 11:12:12.800505857  11:12:12.800 TRC [rtsp] client response:
2024-01-19 11:12:12.800511303  RTSP/1.0 401 Unauthorized
2024-01-19 11:12:12.800513125  Cseq: 1
2024-01-19 11:12:12.800515092  Www-Authenticate: Basic realm="/"
2024-01-19 11:12:12.800516809  
2024-01-19 11:12:12.800518424  
2024-01-19 11:12:12.800539167  11:12:12.800 TRC [rtsp] client request:
2024-01-19 11:12:12.800541202  DESCRIBE rtsp://10.1.8.83:554/stream0 RTSP/1.0
2024-01-19 11:12:12.800543078  Require: www.onvif.org/ver20/backchannel
2024-01-19 11:12:12.800544797  User-Agent: go2rtc/1.8.5
2024-01-19 11:12:12.800546454  CSeq: 2
2024-01-19 11:12:12.800548270  Authorization: Basic YWRtaW46MTIzNDU2
2024-01-19 11:12:12.800549980  Accept: application/sdp
2024-01-19 11:12:12.800551500  
2024-01-19 11:12:12.800552997  
2024-01-19 11:12:12.848995199  11:12:12.848 TRC [rtsp] client response:
2024-01-19 11:12:12.849000661  RTSP/1.0 200 OK
2024-01-19 11:12:12.849002497  Cseq: 2
2024-01-19 11:12:12.849004317  Content-Type: application/sdp
2024-01-19 11:12:12.849006049  Content-Length: 827
2024-01-19 11:12:12.849008041  Content-Base: rtsp://rtsp://10.1.8.83:554/stream0/
2024-01-19 11:12:12.849009705  
2024-01-19 11:12:12.849011246  v=0
2024-01-19 11:12:12.849013083  o=- 1109162014219182 1109162014219192 IN IP4 x.y.z.w
2024-01-19 11:12:12.849014836  s=RTSP/RTP stream from icamra ipc
2024-01-19 11:12:12.849016399  e=NONE
2024-01-19 11:12:12.849018032  c=IN IP4 0.0.0.0
2024-01-19 11:12:12.849019932  a=tool:LIVE555 Streaming Media v2011.05.25 [email protected]
2024-01-19 11:12:12.849021481  t=0 0
2024-01-19 11:12:12.849023043  a=range:npt=0-
2024-01-19 11:12:12.849024618  a=control:*
2024-01-19 11:12:12.849026323  m=video 0 RTP/AVP 96
2024-01-19 11:12:12.849027980  a=rtpmap:96 H264/90000
2024-01-19 11:12:12.849029554  a=control:trackID=1
2024-01-19 11:12:12.849032161  a=fmtp:96 profile-level-id=4D0032;packetization-mode=0;sprop-parameter-sets=Z00AMukAeAET8sIAAAfSAAE40Ag=,aOqPIA==;config=00000001674d0032e900780113f2c2000007d2000138d0080000000168ea8f20
2024-01-19 11:12:12.849033829  a=x-dimensions: 3840, 1080
2024-01-19 11:12:12.849035453  a=x-framerate: 20
2024-01-19 11:12:12.849037021  m=audio 0 RTP/AVP 0
2024-01-19 11:12:12.849038947  a=rtpmap:0 PCMU/8000
2024-01-19 11:12:12.849041398  a=control:trackID=2
2024-01-19 11:12:12.849045060  a=Media_header:MEDIAINFO=494D4B48010100000400010010710110401F000000FA000000000000000000000000000000000000;
2024-01-19 11:12:12.849047603  a=appversion:1.0
2024-01-19 11:12:12.849050089  m=audio 0 RTP/AVP 0
2024-01-19 11:12:12.849053000  a=control:rtsp://rtsp://10.1.8.83:554/stream0/backchannel
2024-01-19 11:12:12.849054873  a=rtpmap:0 PCMU/8000
2024-01-19 11:12:12.849056418  a=sendonly
2024-01-19 11:12:12.849057867  
2024-01-19 11:12:12.849135074  11:12:12.849 TRC [rtsp] client request:
2024-01-19 11:12:12.849137312  SETUP rtsp://10.1.8.83:554/stream0/trackID=1 RTSP/1.0
2024-01-19 11:12:12.849139059  Transport: RTP/AVP/TCP;unicast;interleaved=0-1
2024-01-19 11:12:12.849140559  CSeq: 3
2024-01-19 11:12:12.849142316  Authorization: Basic YWRtaW46MTIzNDU2
2024-01-19 11:12:12.849143765  
2024-01-19 11:12:12.849145199  
2024-01-19 11:12:12.850306484  11:12:12.850 TRC [rtsp] client response:
2024-01-19 11:12:12.850308788  RTSP/1.0 200 OK
2024-01-19 11:12:12.850310226  Cseq: 3
2024-01-19 11:12:12.850311782  Session: 2104156980d
2024-01-19 11:12:12.850313520  Transport: RTP/AVP/TCP;unicast;interleaved=6-7
2024-01-19 11:12:12.850315004  
2024-01-19 11:12:12.850316415  
2024-01-19 11:12:12.850334815  11:12:12.850 TRC [rtsp] client request:
2024-01-19 11:12:12.850336757  SETUP rtsp://10.1.8.83:554/stream0/trackID=2 RTSP/1.0
2024-01-19 11:12:12.850339112  Transport: RTP/AVP/TCP;unicast;interleaved=2-3
2024-01-19 11:12:12.850341462  CSeq: 4
2024-01-19 11:12:12.850344055  Authorization: Basic YWRtaW46MTIzNDU2
2024-01-19 11:12:12.850346495  Session: 2104156980d
2024-01-19 11:12:12.850348597  
2024-01-19 11:12:12.850350837  
2024-01-19 11:12:12.851336834  11:12:12.851 TRC [rtsp] client response:
2024-01-19 11:12:12.851339925  RTSP/1.0 200 OK
2024-01-19 11:12:12.851341817  Cseq: 4
2024-01-19 11:12:12.851343747  Session: 2104156980d
2024-01-19 11:12:12.851345874  Transport: RTP/AVP/TCP;unicast;interleaved=6-7
2024-01-19 11:12:12.851347643  
2024-01-19 11:12:12.851349332  
2024-01-19 11:12:12.851405798  11:12:12.851 TRC [rtsp] client request:
2024-01-19 11:12:12.851409824  PLAY rtsp://10.1.8.83:554/stream0/ RTSP/1.0
2024-01-19 11:12:12.851411750  CSeq: 5
2024-01-19 11:12:12.851413657  Authorization: Basic YWRtaW46MTIzNDU2
2024-01-19 11:12:12.851415386  Session: 2104156980d
2024-01-19 11:12:12.851416958  
2024-01-19 11:12:12.851418484  
2024-01-19 11:12:12.852150443  11:12:12.852 TRC [rtsp] client response:
2024-01-19 11:12:12.852154345  RTSP/1.0 200 OK
2024-01-19 11:12:12.852156239  Rtp-Info: 
2024-01-19 11:12:12.852158027  Cseq: 5
2024-01-19 11:12:12.852160081  Session: 2104156980d
2024-01-19 11:12:12.852162067  Range: npt=0.000-
2024-01-19 11:12:12.852163825  
2024-01-19 11:12:12.852165558  

ronluna avatar Jan 19 '24 16:01 ronluna

Your camera has really bad RTSP realisation. It response with same interleaved for different tracks.

AlexxIT avatar Jan 19 '24 16:01 AlexxIT

also planning to purchase a Vikylin, i wonder if you have tried flashing it with hikvision firmware? i might try that if it does not work, even though i got a other model.

borgqueenx avatar Mar 04 '24 22:03 borgqueenx

https://github.com/AlexxIT/go2rtc/releases/tag/v1.9.0

AlexxIT avatar Apr 30 '24 13:04 AlexxIT

https://github.com/AlexxIT/go2rtc/releases/tag/v1.9.0

Just tried it enabling the backchannel but didn't work.

ronluna avatar Apr 30 '24 22:04 ronluna

I don't think, that your camera can be fixed. v1.9.0 fixes only double rtsp, but not two way.

AlexxIT avatar May 01 '24 03:05 AlexxIT

It was worth a shot... :)

ronluna avatar May 01 '24 10:05 ronluna

Please let me know if the problem is relevant

AlexxIT avatar May 28 '24 14:05 AlexxIT