Two-way audio not working
Hello. I have a 2n IP verso doorbell camera, which i am connecting to my home assistant. I implemented the go2rtc add-on and currently I am successfully seeing the stream with the audio (stream.html). However I also wanted to talk to the intercom through my home assistant and for that I need two-way audio. On the "Streams" page, I clicked on "links". On that page, in the "webrtc Magic" section, I selected the "video+audio+microphone = two way audio from camera" option and then clicked on the webrtc.html link that appears below. I got a black screen. Here's my go2rtc configuration below:
streams:
verso_doorbell:
- rtsp://user:[email protected]/media?vcodec=h264&vres=640x480&fps=15&vbr=2000&audio=1#backchannel=1
log:
level: debug
My intention is to get the two-way audio working in a advanced camera card (formerly known as a frigate card) on my dashboard so I can interact with whoever rings the doorbell. Below is my configuration for that card:
type: custom:advanced-camera-card
title: Outdoor View - 2N Verso
cameras:
- camera_entity: camera.127_0_0_1
name: Front Door
controls: true
live:
provider: go2rtc
autoplay: true
preload: true
controls:
builtin: true
view:
aspect_ratio: "16:9"
refresh: 2s
microphone:
always_connected: false
disconnect_seconds: 60
mute_after_microphone_mute_seconds: 60
menu:
buttons:
microphone:
enabled: true
priority: 100
play:
enabled: false
Could anyone help me with this use case? Thank you in advance!
You just need to look for the probe for your camera in go2rtc webui.
okay I did that and saw that I was only receiving audio and not sending it. So i switched my config to this:
streams:
verso_doorbell:
- rtsp://admin:[email protected]/media?vcodec=h264&vres=640x480&fps=15&vbr=2000&audio=1
- rtsp://admin:[email protected]/onvif/media?transport=unicast&profile=4FC68F7A-BE39-4972-9065-48D5BF4E9CCA
log:
level: debug
Now if I connect (through internal network) to the webrtc.html (with the two-way audio), the stream plays, but I tested to see if I could talk through the intercom and I couldn't. Audio from the intercom still works though. Also my browser asked for mic permission and I said "yes" and the mic on the url bar is red so I'm assuming that part is okay too. Any thoughts on what might be causing this issue?
Have you check probe for new config?
yup, I did. Here it is (two-way audio seems to be okay there):
{
"producers": [
{
"id": 40,
"format_name": "rtsp",
"protocol": "rtsp+tcp",
"remote_addr": "10.0.0.121:554",
"url": "rtsp://admin:[email protected]/media?vcodec=h264\u0026vres=640x480\u0026fps=15\u0026vbr=2000\u0026audio=1",
"sdp": "v=0\r\no=- 0 0 IN IP4 10.0.0.121\r\ns=2N IP Streaming\r\nc=IN IP4 0.0.0.0\r\na=control:rtsp://10.0.0.121/media/all\r\nt=0 0\r\nm=audio 0 RTP/AVP 0\r\nc=IN IP4 0.0.0.0\r\na=rtpmap:0 PCMU/8000\r\na=control:rtsp://10.0.0.121/media/audio\r\na=recvonly\r\nm=audio 0 RTP/AVP 0\r\na=control:rtsp://10.0.0.121/media/audioback\r\na=rtpmap:0 PCMU/8000\r\na=sendonly\r\nm=video 0 RTP/AVP 96\r\nc=IN IP4 0.0.0.0\r\na=rtpmap:96 H264/90000\r\na=fmtp:96 profile-level-id=42801E; packetization-mode=1; sprop-parameter-sets=Z0KAHukBQHog,aM48gA==\r\na=control:rtsp://10.0.0.121/media/video\r\na=recvonly\r\n",
"user_agent": "go2rtc/1.9.10",
"medias": [
"audio, recvonly, PCMU/8000",
"audio, sendonly, PCMU/8000",
"video, recvonly, H264"
],
"receivers": [
{
"id": 41,
"codec": {
"codec_name": "pcm_mulaw",
"codec_type": "audio",
"sample_rate": 8000
},
"childs": [
15,
18,
31,
36
]
},
{
"id": 42,
"codec": {
"codec_name": "h264",
"codec_type": "video",
"level": 30,
"profile": "Baseline"
},
"childs": [
13,
17,
20,
30,
33
]
}
]
},
{
"id": 22,
"format_name": "rtsp",
"protocol": "rtsp+tcp",
"remote_addr": "10.0.0.121:554",
"url": "rtsp://admin:[email protected]/onvif/media?transport=unicast\u0026profile=4FC68F7A-BE39-4972-9065-48D5BF4E9CCA",
"sdp": "v=0\r\no=- 0 0 IN IP4 10.0.0.121\r\ns=2N IP Streaming\r\nc=IN IP4 0.0.0.0\r\na=control:rtsp://10.0.0.121/onvif/media/all\r\nt=0 0\r\nm=audio 0 RTP/AVP 0\r\nc=IN IP4 0.0.0.0\r\na=rtpmap:0 PCMU/8000\r\na=control:rtsp://10.0.0.121/onvif/media/audio\r\na=recvonly\r\nm=audio 0 RTP/AVP 0\r\na=control:rtsp://10.0.0.121/onvif/media/audioback\r\na=rtpmap:0 PCMU/8000\r\na=sendonly\r\nm=video 0 RTP/AVP 26\r\nc=IN IP4 0.0.0.0\r\na=rtpmap:26 JPEG/90000\r\na=control:rtsp://10.0.0.121/onvif/media/video\r\na=recvonly\r\n",
"user_agent": "go2rtc/1.9.10",
"medias": [
"audio, recvonly, PCMU/8000",
"audio, sendonly, PCMU/8000",
"video, recvonly, JPEG"
],
"receivers": [
{
"id": 25,
"codec": {
"codec_name": "pcm_mulaw",
"codec_type": "audio",
"sample_rate": 8000
},
"childs": [
27,
37
],
"bytes": 173280,
"packets": 1083
},
{
"id": 34,
"codec": {
"codec_name": "mjpeg",
"codec_type": "video"
},
"childs": [
35
]
}
],
"senders": [
{
"id": 24,
"codec": {
"codec_name": "pcm_mulaw",
"codec_type": "audio",
"sample_rate": 8000
},
"parent": 21
},
{
"id": 43,
"codec": {
"codec_name": "pcm_mulaw",
"codec_type": "audio",
"sample_rate": 8000
},
"parent": 39
}
],
"bytes_recv": 186684
}
],
"consumers": [
{
"id": 10,
"format_name": "rtsp",
"protocol": "rtsp+tcp",
"remote_addr": "127.0.0.1:41022",
"sdp": "v=0\r\no=- 1 1 IN IP4 0.0.0.0\r\ns=go2rtc/1.9.10\r\nc=IN IP4 0.0.0.0\r\nt=0 0\r\nm=video 0 RTP/AVP 96\r\na=rtpmap:96 H264/90000\r\na=fmtp:96 profile-level-id=42801E; packetization-mode=1; sprop-parameter-sets=Z0KAHukBQHog,aM48gA==\r\na=recvonly\r\na=control:trackID=0\r\nm=audio 0 RTP/AVP 97\r\na=rtpmap:97 PCMU/8000\r\na=recvonly\r\na=control:trackID=1\r\n",
"user_agent": "Lavf60.16.100",
"medias": [
"video, sendonly, ANY",
"audio, sendonly, ANY"
],
"senders": [
{
"id": 13,
"codec": {
"codec_name": "h264",
"codec_type": "video",
"level": 30,
"profile": "Baseline"
},
"parent": 42,
"bytes": 4740625,
"packets": 3562
},
{
"id": 15,
"codec": {
"codec_name": "pcm_mulaw",
"codec_type": "audio",
"sample_rate": 8000
},
"parent": 41,
"bytes": 183040,
"packets": 1144
}
],
"bytes_send": 4998961
},
{
"id": 16,
"format_name": "rtsp",
"protocol": "rtsp+tcp",
"remote_addr": "127.0.0.1:41024",
"sdp": "v=0\r\no=- 1 1 IN IP4 0.0.0.0\r\ns=go2rtc/1.9.10\r\nc=IN IP4 0.0.0.0\r\nt=0 0\r\nm=video 0 RTP/AVP 96\r\na=rtpmap:96 H264/90000\r\na=fmtp:96 profile-level-id=42801E; packetization-mode=1; sprop-parameter-sets=Z0KAHukBQHog,aM48gA==\r\na=recvonly\r\na=control:trackID=0\r\nm=audio 0 RTP/AVP 97\r\na=rtpmap:97 PCMU/8000\r\na=recvonly\r\na=control:trackID=1\r\n",
"user_agent": "go2rtc/ffmpeg",
"medias": [
"video, sendonly, ANY",
"audio, sendonly, ANY"
],
"senders": [
{
"id": 17,
"codec": {
"codec_name": "h264",
"codec_type": "video",
"level": 30,
"profile": "Baseline"
},
"parent": 42,
"bytes": 4693868,
"packets": 3526
},
{
"id": 18,
"codec": {
"codec_name": "pcm_mulaw",
"codec_type": "audio",
"sample_rate": 8000
},
"parent": 41,
"bytes": 181600,
"packets": 1135
}
],
"bytes_send": 4950044
},
{
"id": 19,
"format_name": "webrtc",
"protocol": "ws+udp",
"remote_addr": "10.0.0.107:54606 host",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:143.0) Gecko/20100101 Firefox/143.0",
"medias": [
"video, sendonly, VP8, VP9, H264, AV1",
"audio, recvonly, OPUS/48000/2, G722/8000, PCMU/8000, PCMA/8000",
"audio, sendonly, OPUS/48000/2, G722/8000, PCMU/8000, PCMA/8000, L16, PCML"
],
"receivers": [
{
"id": 21,
"codec": {
"codec_name": "pcm_mulaw",
"codec_type": "audio",
"sample_rate": 8000
},
"childs": [
24
]
}
],
"senders": [
{
"id": 20,
"codec": {
"codec_name": "h264",
"codec_type": "video"
},
"parent": 42,
"bytes": 4464320,
"packets": 3356
},
{
"id": 27,
"codec": {
"codec_name": "pcm_mulaw",
"codec_type": "audio",
"sample_rate": 8000
},
"parent": 25,
"bytes": 173280,
"packets": 1083
}
],
"bytes_send": 4687502
},
{
"id": 29,
"format_name": "webrtc",
"protocol": "ws+udp",
"remote_addr": "10.0.0.107:55160 host",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:143.0) Gecko/20100101 Firefox/143.0",
"medias": [
"video, sendonly, VP8, VP9, H264, AV1",
"audio, sendonly, OPUS/48000/2, G722/8000, PCMU/8000, PCMA/8000, L16, PCML"
],
"senders": [
{
"id": 30,
"codec": {
"codec_name": "h264",
"codec_type": "video"
},
"parent": 42,
"bytes": 1145749,
"packets": 864
},
{
"id": 31,
"codec": {
"codec_name": "pcm_mulaw",
"codec_type": "audio",
"sample_rate": 8000
},
"parent": 41,
"bytes": 43520,
"packets": 272
}
],
"bytes_send": 1201603
},
{
"id": 32,
"format_name": "probe",
"protocol": "http",
"remote_addr": "172.30.32.2:41520 forwarded 176.78.93.150, 172.30.32.1",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:143.0) Gecko/20100101 Firefox/143.0",
"medias": [
"video, sendonly, ALL",
"audio, sendonly, ALL",
"audio, recvonly, ANY"
],
"receivers": [
{
"id": 38,
"codec": {
"codec_name": "ANY",
"codec_type": ""
}
},
{
"id": 39,
"codec": {
"codec_name": "ANY",
"codec_type": ""
},
"childs": [
43
]
}
],
"senders": [
{
"id": 33,
"codec": {
"codec_name": "h264",
"codec_type": "video",
"level": 30,
"profile": "Baseline"
},
"parent": 42
},
{
"id": 35,
"codec": {
"codec_name": "mjpeg",
"codec_type": "video"
},
"parent": 34
},
{
"id": 36,
"codec": {
"codec_name": "pcm_mulaw",
"codec_type": "audio",
"sample_rate": 8000
},
"parent": 41
},
{
"id": 37,
"codec": {
"codec_name": "pcm_mulaw",
"codec_type": "audio",
"sample_rate": 8000
},
"parent": 25
}
]
}
]
}
Btw really appreciate your help. Thank you!
Two ways seems to work. But it's very strange and unclear. For some reason, the first source did not turn on backchannel. But it turned on twice for the second source. But in any case, the transmitted packets are not recorded there.
okay I see. What would you recommend for me to do now? i'm a bit of a newbie here ahaha
- remove second source
- reboot camera
- try another browser
@iliyanHHabibo Did you succeed? I have the same issue #1826 but so far everything i have tried has failed
Hello @AlexxIT , I've the same issue with this Intercom (2N IP Verso).
I did reboot the camera several times and also tried another browser (Edge, Chrome) and tried different devices (PC, Notebook) but I was not successfull.
Can you explain me how I can remove the seconds source?
If I try to connect to the intercom via this URL: rtsp://user:passwd@INTERCOM_IP:554 I get no warning or errors inside the log.
Because of https I connected to home assistant via a reverse proxy. I do not know if this could probably be an issue.
In the "net" tab I can see the following:
{
"producers": [
{
"id": 62,
"format_name": "rtsp",
"protocol": "rtsp+tcp",
"remote_addr": "192.168.1.20:554",
"url": "rtsp://user:[email protected]:554",
"sdp": "v=0\r\no=- 0 0 IN IP4 192.168.1.20\r\ns=2N IP Streaming\r\nc=IN IP4 0.0.0.0\r\na=control:rtsp://192.168.1.20/all\r\nt=0 0\r\nm=audio 0 RTP/AVP 0\r\nc=IN IP4 0.0.0.0\r\na=rtpmap:0 PCMU/8000\r\na=control:rtsp://192.168.1.20/audio\r\na=recvonly\r\nm=video 0 RTP/AVP 96\r\nc=IN IP4 0.0.0.0\r\na=rtpmap:96 H264/90000\r\na=fmtp:96 profile-level-id=42801E; packetization-mode=1; sprop-parameter-sets=Z0KAHukBQHog,aM48gA==\r\na=control:rtsp://192.168.1.20/video\r\na=recvonly\r\n",
"user_agent": "go2rtc/1.9.9",
"medias": [
"audio, recvonly, PCMU/8000",
"video, recvonly, H264"
],
"receivers": [
{
"id": 64,
"codec": {
"codec_name": "h264",
"codec_type": "video",
"level": 30,
"profile": "Baseline"
},
"childs": [
71,
75
],
"bytes": 1960517,
"packets": 1464
},
{
"id": 67,
"codec": {
"codec_name": "pcm_mulaw",
"codec_type": "audio",
"sample_rate": 8000
},
"childs": [
72,
76
],
"bytes": 116320,
"packets": 727
}
],
"bytes_recv": 2103661
}
],
"consumers": [
{
"id": 70,
"format_name": "webrtc",
"protocol": "ws+udp",
"remote_addr": "[fd86:acb:bc1a:0:fed3:e6ec:221a:f128]:57269 prflx",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36",
"medias": [
"video, sendonly, VP8, VP9, H264, AV1, H265",
"audio, recvonly, OPUS/48000/2, G722/8000, PCMU/8000, PCMA/8000",
"audio, sendonly, OPUS/48000/2, G722/8000, PCMU/8000, PCMA/8000, L16, PCML"
],
"receivers": [
{
"id": 73,
"codec": {
"channels": 2,
"codec_name": "opus",
"codec_type": "audio",
"sample_rate": 48000
},
"bytes": 18181,
"packets": 398
}
],
"senders": [
{
"id": 71,
"codec": {
"codec_name": "h264",
"codec_type": "video"
},
"parent": 64,
"bytes": 1105186,
"packets": 823
},
{
"id": 72,
"codec": {
"codec_name": "pcm_mulaw",
"codec_type": "audio",
"sample_rate": 8000
},
"parent": 67,
"bytes": 66080,
"packets": 413
}
],
"bytes_recv": 26351,
"bytes_send": 1183662
},
{
"id": 74,
"format_name": "probe",
"protocol": "http",
"remote_addr": "172.30.32.2:42758 forwarded 192.168.0.39, 172.30.32.1",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0",
"medias": [
"video, sendonly, ALL",
"audio, sendonly, ALL",
"audio, recvonly, ANY"
],
"senders": [
{
"id": 75,
"codec": {
"codec_name": "h264",
"codec_type": "video",
"level": 30,
"profile": "Baseline"
},
"parent": 64
},
{
"id": 76,
"codec": {
"codec_name": "pcm_mulaw",
"codec_type": "audio",
"sample_rate": 8000
},
"parent": 67
}
]
}
]
}
@eddi05 your camera don't have two way audio support over RTSP. Or this support temporary broken (based on info you provided).
Hi @AlexxIT , thank you very much für checking the data. It is the same camera as the other Person uses in this thread. According to the manufactorer the camera Supports onvif Profile T, which is nesassary für two way Audio. Maybe I use Not the URL for the stream. I will try this with A different url in the neyt das. Here you can finde the manual for the streaming configuration of the intercom https://wiki.2n.com/hip/conf/latest/en/5-konfigurace-interkomu/5-4-sluzby/5-4-2-streamovani
Hi @TheMagnetar @iliyanHHabibo @AlexxIT , I’ve now managed to get two-way communication working. I’m using the configuration line that I copied above from @iliyanHHabibo streams:
streams:
2N_Verso:
- rtsp://user:pass@2N_VERSO_IP_ADDRESS/onvif/media?transport=unicast&profile=4FC68F7A-BE39-4972-9065-48D5BF4E9CCA
With this, two-way communication works for me over HTTPS. It also works via the Companion App when it’s connected to Home Assistant over SSL. Using the standard RTSP link that the 2N Verso also provides, I wasn’t able to establish two-way communication. Somehow, go2rtc and the 2N Verso don’t get along. This line do not work for two way audio:
streams:
2N_Verso_rtsp:
- rtsp://user:[email protected]/media?vcodec=h264&vres=640x480&fps=30&vbr=2048&audio=1
here are the two probes, I think the 2N Verso announce the back-channel in the sdp line, but I'm not sure why the back channel isn't set up correctly. Therefor I've formatted the sdp line for better reading (replaced \r\n) by "real" \r\n 2N_Verso (onvif line)
{
"producers": [
{
"id": 2,
"format_name": "rtsp",
"protocol": "rtsp+tcp",
"remote_addr": "192.168.1.20:554",
"url": "rtsp://user:[email protected]/onvif/media?transport=unicast\u0026profile=4FC68F7A-BE39-4972-9065-48D5BF4E9CCA",
"sdp": "v=0
o=- 0 0 IN IP4 192.168.1.20
s=2N IP Streaming
c=IN IP4 0.0.0.0
a=control:rtsp://192.168.1.20/onvif/media/all
t=0 0
m=audio 0 RTP/AVP 0
c=IN IP4 0.0.0.0
a=rtpmap:0 PCMU/8000
a=control:rtsp://192.168.1.20/onvif/media/audio
a=recvonly
m=audio 0 RTP/AVP 0
a=control:rtsp://192.168.1.20/onvif/media/audioback
a=rtpmap:0 PCMU/8000
a=sendonly
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
a=rtpmap:96 H264/90000
a=fmtp:96 profile-level-id=42801E; packetization-mode=1; sprop-parameter-sets=Z0KAHukBQHog,aM48gA==
a=control:rtsp://192.168.1.20/onvif/media/video
a=recvonly\r\n",
"user_agent": "go2rtc/1.9.11",
"medias": [
"audio, recvonly, PCMU/8000",
"audio, sendonly, PCMU/8000",
"video, recvonly, H264"
],
"receivers": [
{
"id": 3,
"codec": {
"codec_name": "h264",
"codec_type": "video",
"level": 30,
"profile": "Baseline"
},
"childs": [
4
]
},
{
"id": 5,
"codec": {
"codec_name": "pcm_mulaw",
"codec_type": "audio",
"sample_rate": 8000
},
"childs": [
6
]
}
],
"senders": [
{
"id": 8,
"codec": {
"codec_name": "pcm_mulaw",
"codec_type": "audio",
"sample_rate": 8000
},
"parent": 7
}
]
}
],
"consumers": [
{
"id": 1,
"format_name": "probe",
"protocol": "http",
"remote_addr": "172.30.32.2:35224 forwarded 84.148.47.182, 192.168.1.4, 172.30.32.1",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0",
"medias": [
"video, sendonly, ALL",
"audio, sendonly, ALL",
"audio, recvonly, ANY"
],
"receivers": [
{
"id": 7,
"codec": {
"codec_name": "ANY",
"codec_type": ""
},
"childs": [
8
]
}
],
"senders": [
{
"id": 4,
"codec": {
"codec_name": "h264",
"codec_type": "video",
"level": 30,
"profile": "Baseline"
},
"parent": 3
},
{
"id": 6,
"codec": {
"codec_name": "pcm_mulaw",
"codec_type": "audio",
"sample_rate": 8000
},
"parent": 5
}
]
}
]
}
2N_Verso_rtsp stream (from 2N Verso Web-Interface)
{
"producers": [
{
"id": 39,
"format_name": "rtsp",
"protocol": "rtsp+tcp",
"remote_addr": "192.168.1.20:554",
"url": "rtsp://user:[email protected]/media?vcodec=h264\u0026vres=640x480\u0026fps=30\u0026vbr=2048\u0026audio=1",
"sdp": "v=0
o=- 0 0 IN IP4 192.168.1.20
s=2N IP Streaming
c=IN IP4 0.0.0.0
a=control:rtsp://192.168.1.20/media/all
t=0 0
m=audio 0 RTP/AVP 0
c=IN IP4 0.0.0.0
a=rtpmap:0 PCMU/8000
a=control:rtsp://192.168.1.20/media/audio
a=recvonly
m=video 0 RTP/AVP 96
c=IN IP4 0.0.0.0
a=rtpmap:96 H264/90000
a=fmtp:96 profile-level-id=42801E; packetization-mode=1; sprop-parameter-sets=Z0KAHukBQHog,aM48gA==
a=control:rtsp://192.168.1.20/media/video
a=recvonly",
"user_agent": "go2rtc/1.9.11",
"medias": [
"audio, recvonly, PCMU/8000",
"audio, sendonly, PCMU/8000"
],
"receivers": [
{
"id": 40,
"codec": {
"codec_name": "pcm_mulaw",
"codec_type": "audio",
"sample_rate": 8000
},
"childs": [
44
],
"bytes": 645600,
"packets": 4035
},
{
"id": 41,
"codec": {
"codec_name": "h264",
"codec_type": "video",
"level": 30,
"profile": "Baseline"
},
"childs": [
30,
43
],
"bytes": 7798189,
"packets": 5848
}
],
"bytes_recv": 8565349
}
],
"consumers": [
{
"id": 27,
"format_name": "webrtc",
"protocol": "ws+udp",
"remote_addr": "[fd86:acb:bc1a:0:fed3:e6ec:221a:f128]:54249 prflx",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0",
"medias": [
"video, sendonly, VP8, VP9, H264, AV1",
"audio, recvonly, OPUS/48000/2, G722/8000, PCMU/8000, PCMA/8000",
"audio, sendonly, OPUS/48000/2, G722/8000, PCMU/8000, PCMA/8000, L16, PCML"
],
"receivers": [
{
"id": 31,
"codec": {
"codec_name": "pcm_mulaw",
"codec_type": "audio",
"sample_rate": 8000
},
"bytes": 781600,
"packets": 4885
}
],
"senders": [
{
"id": 30,
"codec": {
"codec_name": "h264",
"codec_type": "video"
},
"parent": 41,
"bytes": 9524619,
"packets": 7146
}
],
"bytes_recv": 880567,
"bytes_send": 9629712
},
{
"id": 42,
"format_name": "probe",
"protocol": "http",
"remote_addr": "172.30.32.2:52664 forwarded 84.148.47.182, 192.168.1.4, 172.30.32.1",
"user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0",
"medias": [
"video, sendonly, ALL",
"audio, sendonly, ALL",
"audio, recvonly, ANY"
],
"receivers": [
{
"id": 45,
"codec": {
"codec_name": "ANY",
"codec_type": ""
}
}
],
"senders": [
{
"id": 43,
"codec": {
"codec_name": "h264",
"codec_type": "video",
"level": 30,
"profile": "Baseline"
},
"parent": 41
},
{
"id": 44,
"codec": {
"codec_name": "pcm_mulaw",
"codec_type": "audio",
"sample_rate": 8000
},
"parent": 40
}
]
}
]
}
One hint:
For anyone curious about the origin of this line:
rtsp://user:pass@2N_VERSO_IP_ADDRESS/onvif/media?transport=unicast&profile=4FC68F7A-BE39-4972-9065-48D5BF4E9CCA
I also wasn’t sure where this URL came from. So I downloaded the "ONVIF Device Manager." It can establish a connection to ONVIF devices, and there you’ll find the corresponding addresses.
Each ONVIF profile has its own UUID. You can load the profile under the "Profiles" section.
My 2N Verso ONVIF configuration:
@eddi05 thanks for taking the time to write your findings! I will give it a go
In my case, with the 2.0 version of the IP Verso, I do not get the UUID stream but only these profiles
Selecting either of them in go2rtc does not provide the sdp output that you provided @eddi05
Do you receive any rtsp URL in ODM? Maybe you have A different uuid in the URL because of the next Version of the 2N IP Verso? Just select A Profile, open the live screen and look for the URL as shown in the ODM Screenshot before.
Yes using the ODM I get the profiles (that is the screenshot) but no UUID. I get:
- rtsp://192.168.80.5/onvif/media?transport=unicast\u0026profile=profile_h264_hq
- rtsp://192.168.80.5/onvif/media?transport=unicast\u0026profile=profile_h264_lq
- rtsp://192.168.80.5/onvif/media?transport=unicast\u0026profile=profile_h264
I have tried go2rtc as standalone and in frigate. No effect on the result
This is the output of "info", which differs from "probe" (second output)
{
"producers": [
{
"id": 14,
"format_name": "rtsp",
"protocol": "rtsp+tcp",
"remote_addr": "192.168.80.5:554",
"url": "rtsp://frigate:[email protected]/onvif/media?transport=unicast\u0026profile=profile_h264_hq",
"sdp": "v=0\r\no=- 0 0 IN IP4 192.168.80.5\r\ns=2N IP Streaming\r\nc=IN IP4 0.0.0.0\r\na=control:rtsp://192.168.80.5/onvif/media/all\r\nt=0 0\r\nm=audio 0 RTP/AVP 0\r\nc=IN IP4 0.0.0.0\r\na=rtpmap:0 PCMU/8000\r\na=control:rtsp://192.168.80.5/onvif/media/audio\r\na=recvonly\r\nm=audio 0 RTP/AVP 0\r\na=control:rtsp://192.168.80.5/onvif/media/audioback\r\na=rtpmap:0 PCMU/8000\r\na=sendonly\r\nm=video 0 RTP/AVP 96\r\nc=IN IP4 0.0.0.0\r\na=rtpmap:96 H264/90000\r\na=fmtp:96 profile-level-id=428032; packetization-mode=1; sprop-parameter-sets=Z0IAMuKQDwBa03AQEBpQANu6ABm/zADxIio=,aM48gA==\r\na=control:rtsp://192.168.80.5/onvif/media/video\r\na=recvonly\r\n",
"user_agent": "go2rtc/1.9.9",
"medias": [
"audio, recvonly, PCMU/8000",
"audio, sendonly, PCMU/8000",
"video, recvonly, H264"
],
"receivers": [
{
"id": 15,
"codec": {
"codec_name": "pcm_mulaw",
"codec_type": "audio",
"sample_rate": 8000
},
"childs": [
6
],
"bytes": 27852640,
"packets": 174079
},
{
"id": 16,
"codec": {
"codec_name": "h264",
"codec_type": "video",
"level": 50,
"profile": "Baseline"
},
"childs": [
4
],
"bytes": 1703927000,
"packets": 1327563
}
],
"bytes_recv": 1749913924
}
],
"consumers": [
{
"id": 1,
"format_name": "rtsp",
"protocol": "rtsp+tcp",
"remote_addr": "127.0.0.1:59872",
"sdp": "v=0\r\no=- 1 1 IN IP4 0.0.0.0\r\ns=go2rtc/1.9.9\r\nc=IN IP4 0.0.0.0\r\nt=0 0\r\nm=video 0 RTP/AVP 96\r\na=rtpmap:96 H264/90000\r\na=fmtp:96 profile-level-id=428032; packetization-mode=1; sprop-parameter-sets=Z0IAMuKQDwBa03AQEBpQANu6ABm/zADxIio=,aM48gA==\r\na=recvonly\r\na=control:trackID=0\r\nm=audio 0 RTP/AVP 97\r\na=rtpmap:97 PCMU/8000\r\na=recvonly\r\na=control:trackID=1\r\n",
"user_agent": "FFmpeg Frigate/0.16.2-4d58206",
"medias": [
"video, sendonly, ANY",
"audio, sendonly, ANY"
],
"senders": [
{
"id": 4,
"codec": {
"codec_name": "h264",
"codec_type": "video",
"level": 50,
"profile": "Baseline"
},
"parent": 16,
"bytes": 1725871139,
"packets": 1344698
},
{
"id": 6,
"codec": {
"codec_name": "pcm_mulaw",
"codec_type": "audio",
"sample_rate": 8000
},
"parent": 15,
"bytes": 28223680,
"packets": 176398
}
],
"bytes_send": 1778432355
}
]
}
And this is the "Probe" output
{
"producers": [
{
"id": 61,
"format_name": "rtsp",
"protocol": "rtsp+tcp",
"remote_addr": "192.168.80.5:554",
"url": "rtsp://frigate:[email protected]/onvif/media?transport=unicast\u0026profile=profile_h264_hq",
"sdp": "v=0\r\no=- 0 0 IN IP4 192.168.80.5\r\ns=2N IP Streaming\r\nc=IN IP4 0.0.0.0\r\na=control:rtsp://192.168.80.5/onvif/media/all\r\nt=0 0\r\nm=audio 0 RTP/AVP 0\r\nc=IN IP4 0.0.0.0\r\na=rtpmap:0 PCMU/8000\r\na=control:rtsp://192.168.80.5/onvif/media/audio\r\na=recvonly\r\nm=video 0 RTP/AVP 96\r\nc=IN IP4 0.0.0.0\r\na=rtpmap:96 H264/90000\r\na=fmtp:96 profile-level-id=428032; packetization-mode=1; sprop-parameter-sets=Z0IAMuKQDwBa03AQEBpQANu6ABm/zADxIio=,aM48gA==\r\na=control:rtsp://192.168.80.5/onvif/media/video\r\na=recvonly\r\n",
"user_agent": "go2rtc/1.9.9",
"medias": [
"audio, recvonly, PCMU/8000",
"audio, sendonly, PCMU/8000"
],
"receivers": [
{
"id": 62,
"codec": {
"codec_name": "pcm_mulaw",
"codec_type": "audio",
"sample_rate": 8000
},
"childs": [
6,
66
],
"bytes": 421760,
"packets": 2636
},
{
"id": 63,
"codec": {
"codec_name": "h264",
"codec_type": "video",
"level": 50,
"profile": "Baseline"
},
"childs": [
4,
65
],
"bytes": 26090703,
"packets": 20305
}
],
"bytes_recv": 26789591
}
],
"consumers": [
{
"id": 1,
"format_name": "rtsp",
"protocol": "rtsp+tcp",
"remote_addr": "127.0.0.1:59872",
"sdp": "v=0\r\no=- 1 1 IN IP4 0.0.0.0\r\ns=go2rtc/1.9.9\r\nc=IN IP4 0.0.0.0\r\nt=0 0\r\nm=video 0 RTP/AVP 96\r\na=rtpmap:96 H264/90000\r\na=fmtp:96 profile-level-id=428032; packetization-mode=1; sprop-parameter-sets=Z0IAMuKQDwBa03AQEBpQANu6ABm/zADxIio=,aM48gA==\r\na=recvonly\r\na=control:trackID=0\r\nm=audio 0 RTP/AVP 97\r\na=rtpmap:97 PCMU/8000\r\na=recvonly\r\na=control:trackID=1\r\n",
"user_agent": "FFmpeg Frigate/0.16.2-4d58206",
"medias": [
"video, sendonly, ANY",
"audio, sendonly, ANY"
],
"senders": [
{
"id": 4,
"codec": {
"codec_name": "h264",
"codec_type": "video",
"level": 50,
"profile": "Baseline"
},
"parent": 63,
"bytes": 2484495231,
"packets": 1935372
},
{
"id": 6,
"codec": {
"codec_name": "pcm_mulaw",
"codec_type": "audio",
"sample_rate": 8000
},
"parent": 62,
"bytes": 40419040,
"packets": 252619
}
],
"bytes_send": 2559922127
},
{
"id": 64,
"format_name": "probe",
"protocol": "http",
"remote_addr": "192.168.1.160:32866",
"user_agent": "Mozilla/5.0 (X11; Linux x86_64; rv:144.0) Gecko/20100101 Firefox/144.0",
"medias": [
"video, sendonly, ALL",
"audio, sendonly, ALL",
"audio, recvonly, ANY"
],
"receivers": [
{
"id": 67,
"codec": {
"codec_name": "ANY",
"codec_type": ""
}
}
],
"senders": [
{
"id": 65,
"codec": {
"codec_name": "h264",
"codec_type": "video",
"level": 50,
"profile": "Baseline"
},
"parent": 63
},
{
"id": 66,
"codec": {
"codec_name": "pcm_mulaw",
"codec_type": "audio",
"sample_rate": 8000
},
"parent": 62
}
]
}
]
}
Did you try to start the stream in that way?
- Click on "links"
- Scroll down to WebRTC Magic and select "video+audio+microphone"
- click on webrtc.html
Please make sure, you use a HTTPS connection, otherwise the microphone will not be enabled by the browser.
just for documentation... It seems that the 2N IP Verso 2.0 have different names for die streaming profiles. The Version 1.0 uses UUIDs, the version 2.0 readable profile names.
For 2N IP Verso 1.0 the streaming profiles have the following names (according to ODM) ONVIF PROFILE1 rtsp://user:pass@2N_VERSO_IP_ADDRESS/onvif/media?transport=unicast&profile=4FC68F7A-BE39-4972-9065-48D5BF4E9CCA
ONVIF PROFILE2 rtsp://user:pass@2N_VERSO_IP_ADDRESS/onvif/media?transport=unicast&profile=2FF07D44-8FF7-4983-99CB-31AF589BFB3A
ONVIF PROFILE3 rtsp://user:pass@2N_VERSO_IP_ADDRESS/onvif/media?transport=unicast&profile=888EF635-E192-4E4D-9729-612941712D91
Yes. I did that. I get no audio when I try to start with microphone (no background noise either) as opposed to when i start with video + audio (I can hear then the background noise). The configuration is as follows
webrtc:
candidates:
- stun:8555 # if you have a dynamic public IP address
streams:
2N_Verso:
- rtsp://admin:[email protected]/onvif/media?transport=unicast&profile=profile_h264_hq
and I get this error:
undefined error=start from CONN state url=rtsp://admin:[email protected]/onvif/media?transport=unicast&profile=profile_h264_hq caller=github.com/AlexxIT/go2rtc/internal/streams/producer.go:170
{
"producers": [
{
"id": 47,
"format_name": "rtsp",
"protocol": "rtsp+tcp",
"remote_addr": "192.168.80.5:554",
"url": "rtsp://admin:[email protected]/onvif/media?transport=unicast\u0026profile=profile_h264_hq",
"sdp": "v=0\r\no=- 0 0 IN IP4 192.168.80.5\r\ns=2N IP Streaming\r\nc=IN IP4 0.0.0.0\r\na=control:rtsp://192.168.80.5/onvif/media/all\r\nt=0 0\r\nm=audio 0 RTP/AVP 0\r\nc=IN IP4 0.0.0.0\r\na=rtpmap:0 PCMU/8000\r\na=control:rtsp://192.168.80.5/onvif/media/audio\r\na=recvonly\r\nm=audio 0 RTP/AVP 0\r\na=control:rtsp://192.168.80.5/onvif/media/audioback\r\na=rtpmap:0 PCMU/8000\r\na=sendonly\r\nm=video 0 RTP/AVP 96\r\nc=IN IP4 0.0.0.0\r\na=rtpmap:96 H264/90000\r\na=fmtp:96 profile-level-id=428032; packetization-mode=1; sprop-parameter-sets=Z0IAMuKQDwBa03AQEBpQANu6ABm/zADxIio=,aM48gA==\r\na=control:rtsp://192.168.80.5/onvif/media/video\r\na=recvonly\r\n",
"user_agent": "go2rtc/1.9.11",
"medias": [
"audio, recvonly, PCMU/8000",
"audio, sendonly, PCMU/8000",
"video, recvonly, H264"
],
"receivers": [
{
"id": 48,
"codec": {
"codec_name": "h264",
"codec_type": "video",
"level": 50,
"profile": "Baseline"
},
"childs": [
45
],
"bytes": 1523258,
"packets": 1175
}
],
"bytes_recv": 1536014
}
],
"consumers": [
{
"id": 42,
"format_name": "webrtc",
"protocol": "ws+udp",
"remote_addr": "192.168.1.160:41398 host",
"user_agent": "Mozilla/5.0 (X11; Linux x86_64; rv:144.0) Gecko/20100101 Firefox/144.0",
"medias": [
"video, sendonly, VP8, VP9, H264, AV1",
"audio, recvonly, OPUS/48000/2, G722/8000, PCMU/8000, PCMA/8000",
"audio, sendonly, OPUS/48000/2, G722/8000, PCMU/8000, PCMA/8000, L16, PCML"
],
"receivers": [
{
"id": 46,
"codec": {
"codec_name": "pcm_mulaw",
"codec_type": "audio",
"sample_rate": 8000
},
"bytes": 23040,
"packets": 144
}
],
"senders": [
{
"id": 45,
"codec": {
"codec_name": "h264",
"codec_type": "video"
},
"parent": 48,
"bytes": 1526058,
"packets": 1177
}
],
"bytes_recv": 24768,
"bytes_send": 1337677
}
]
}
I'm not sure I can interprete the output correcty. Maybe @AlexxIT can help at this point.
From my point of view the camera offers a backchannel audio stream according to the sdp line
...a=control:rtsp://192.168.80.5/onvif/media/audioback...
and medias line
"medias": [... "audio, sendonly, PCMU/8000" ...],
But due to the warning in the log I guess the camera declines the connection of the audio backchannel.
In case the camera accept the stream I would then expect the following block in the "consumers" section:
"receivers": [
{
"id": SOME_UNIQUE_ID,
"codec": {
"codec_name": "pcm_mulaw",
"codec_type": "audio",
"sample_rate": 8000
},
"childs": [
OTHER_UNIQUE_ID
],
"bytes": 48160,
"packets": 301
}
],
And the following child in the "producers" section:
"senders": [
{
"id": OTHER_UNIQUE_ID,
"codec": {
"codec_name": "pcm_mulaw",
"codec_type": "audio",
"sample_rate": 8000
},
"parent": SOME_UNIQUE_ID,
"bytes": 48160,
"packets": 301
}
],
One more idea... Can you find a token in ODM - Profiles, when you select a profile?
Yes a I do