Dahua VTO support

Browser is asking for microphone permission, but no audio from VTO and unmute button is disabled
api:
  base_path: "/go2rtc"
streams:
  vto:
    - rtsp://admin:pass@<IP_ADDRESS>/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif

[
  {
    "media:0": "video, sendonly, 96 H264/90000",
    "media:1": "audio, sendonly, 97 L16/16000",
    "media:2": "application, sendonly, 107 VND.ONVIF.METADATA/90000",
    "media:3": "audio, recvonly, 97 L16/16000",
    "receive": 824840,
    "remote_addr": "<IP_ADDRESS>:554",
    "send": 0,
    "track:0": "96 H264/90000, sinks=1",
    "type": "RTSP client producer",
    "url": "rtsp://<IP_ADDRESS>:554/cam/realmonitor?channel=1\u0026subtype=0\u0026unicast=true\u0026proto=Onvif/"
  },
  {
    "remote_addr": "udp4 host <IP_ADDRESS>:63426",
    "send": 826301,
    "type": "WebRTC server consumer",
    "user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.4976.0 Safari/537.36"
  }
]

v=0
o=-<PHONE_NUMBER>131000794 2 IN IP4 <IP_ADDRESS>
s=-
t=0 0
a=group:BUNDLE 0 1
a=extmap-allow-mixed
a=msid-semantic: WMS mUTzunk2m8gOBSbMpIqZr9ZW7amqcT2Uu8h0
m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 102 123 35 36 127 122 125 107 108 109 124 121 120 119 114 37
c=IN IP4 <IP_ADDRESS>
a=rtcp:9 IN IP4 <IP_ADDRESS>
a=ice-ufrag:cSCj
a=ice-pwd:azQ5DYFApCx3rzPQWvEqknTA
a=ice-options:trickle
a=fingerprint:sha-256 2A:0A:DC:2B:B9:B5:CC:A3:07:E0:98:E7:B3:65:7A:2B:98:5E:AA:AE:0E:76:DB:71:3F:52:3D:E8:55:2B:F8:F7
a=setup:actpass
a=mid:0
a=extmap:1 urn:ietf:params:rtp-hdrext:toffset
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:3 urn:3gpp:video-orientation
a=extmap:4 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type
a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing
a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space
a=extmap:9 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
a=extmap:11 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id
a=recvonly
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 goog-remb
a=rtcp-fb:96 transport-cc
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
a=rtpmap:98 VP9/90000
a=rtcp-fb:98 goog-remb
a=rtcp-fb:98 transport-cc
a=rtcp-fb:98 ccm fir
a=rtcp-fb:98 nack
a=rtcp-fb:98 nack pli
a=fmtp:98 profile-id=0
a=rtpmap:99 rtx/90000
a=fmtp:99 apt=98
a=rtpmap:100 VP9/90000
a=rtcp-fb:100 goog-remb
a=rtcp-fb:100 transport-cc
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=fmtp:100 profile-id=2
a=rtpmap:101 rtx/90000
a=fmtp:101 apt=100
a=rtpmap:102 VP9/90000
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=fmtp:102 profile-id=1
a=rtpmap:123 rtx/90000
a=fmtp:123 apt=102
a=rtpmap:35 AV1/90000
a=rtcp-fb:35 goog-remb
a=rtcp-fb:35 transport-cc
a=rtcp-fb:35 ccm fir
a=rtcp-fb:35 nack
a=rtcp-fb:35 nack pli
a=rtpmap:36 rtx/90000
a=fmtp:36 apt=35
a=rtpmap:127 H264/90000
a=rtcp-fb:127 goog-remb
a=rtcp-fb:127 transport-cc
a=rtcp-fb:127 ccm fir
a=rtcp-fb:127 nack
a=rtcp-fb:127 nack pli
a=fmtp:127 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f
a=rtpmap:122 rtx/90000
a=fmtp:122 apt=127
a=rtpmap:125 H264/90000
a=rtcp-fb:125 goog-remb
a=rtcp-fb:125 transport-cc
a=rtcp-fb:125 ccm fir
a=rtcp-fb:125 nack
a=rtcp-fb:125 nack pli
a=fmtp:125 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=4d001f
a=rtpmap:107 rtx/90000
a=fmtp:107 apt=125
a=rtpmap:108 H264/90000
a=rtcp-fb:108 goog-remb
a=rtcp-fb:108 transport-cc
a=rtcp-fb:108 ccm fir
a=rtcp-fb:108 nack
a=rtcp-fb:108 nack pli
a=fmtp:108 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=64001f
a=rtpmap:109 rtx/90000
a=fmtp:109 apt=108
a=rtpmap:124 H264/90000
a=rtcp-fb:124 goog-remb
a=rtcp-fb:124 transport-cc
a=rtcp-fb:124 ccm fir
a=rtcp-fb:124 nack
a=rtcp-fb:124 nack pli
a=fmtp:124 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f
a=rtpmap:121 rtx/90000
a=fmtp:121 apt=124
a=rtpmap:120 red/90000
a=rtpmap:119 rtx/90000
a=fmtp:119 apt=120
a=rtpmap:114 ulpfec/90000
a=rtpmap:37 flexfec-03/90000
a=rtcp-fb:37 goog-remb
a=rtcp-fb:37 transport-cc
a=fmtp:37 repair-window=10000000
m=audio 9 UDP/TLS/RTP/SAVPF 111 63 103 104 9 0 8 106 105 13 110 112 113 126
c=IN IP4 <IP_ADDRESS>
a=rtcp:9 IN IP4 <IP_ADDRESS>
a=ice-ufrag:cSCj
a=ice-pwd:azQ5DYFApCx3rzPQWvEqknTA
a=ice-options:trickle
a=fingerprint:sha-256 2A:0A:DC:2B:B9:B5:CC:A3:07:E0:98:E7:B3:65:7A:2B:98:5E:AA:AE:0E:76:DB:71:3F:52:3D:E8:55:2B:F8:F7
a=setup:actpass
a=mid:1
a=extmap:14 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:4 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:9 urn:ietf:params:rtp-hdrext:sdes:mid
a=sendrecv
a=msid:mUTzunk2m8gOBSbMpIqZr9ZW7amqcT2Uu8h0 9654a211-5d7a-4500-8034-3b17b1c6c7a7
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=rtpmap:63 red/48000/2
a=fmtp:63 111/111
a=rtpmap:103 ISAC/16000
a=rtpmap:104 ISAC/32000
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:106 CN/32000
a=rtpmap:105 CN/16000
a=rtpmap:13 CN/8000
a=rtpmap:110 telephone-event/48000
a=rtpmap:112 telephone-event/32000
a=rtpmap:113 telephone-event/16000
a=rtpmap:126 telephone-event/8000
a=ssrc:1443778823 cname:5sgtTCGio9Mf4sP8
a=ssrc:1443778823 msid:mUTzunk2m8gOBSbMpIqZr9ZW7amqcT2Uu8h0 9654a211-5d7a-4500-8034-3b17b1c6c7a7
a=ssrc:1443778823 mslabel:mUTzunk2m8gOBSbMpIqZr9ZW7amqcT2Uu8h0
a=ssrc:1443778823 label:9654a211-5d7a-4500-8034-3b17b1c6c7a7

6webrtc.html:1 Uncaught (in promise) DOMException: Failed to execute 'addIceCandidate' on 'RTCPeerConnection': The remote description was null

The camera is outputting a format that is incompatible with webrtc.  Probably AAC.  So transcode it to something webrtc friendly or go into your camera settings and change it to a compatible format.  If its like my amcrest, you can change it to G.711 so you don't need to transcode.
Alternatively, this would work:
  backyard_main:
    - rtsp://admin:pass@<IP_ADDRESS>/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif
    - ffmpeg:rtsp://admin:pass@<IP_ADDRESS>/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif#audio=opus

https://developer.mozilla.org/en-US/docs/Web/Media/Formats/WebRTC_codecs#supported_audio_codecs

Both send and receive tracks has L16 coded.
L16 is not AAC, but also doesn't supported by WebRTC. It's possible to receive audio with transcoding via FFmpeg.
But send audio (from microphone) with transcoding is not supported yet.

So Dahua VTO2211G do not allow to change audio codec via browser UI. Maybe there is a way using ONVIF, GET param or dahua api ?
Documentation show that device support
G.711Mu; G.711u; PCM audio compression
https://www.dahuasecurity.com/my/products/All-Products/Video-Intercoms/IP-Series/Villa-Door-Station/Pro-Series/VTO2211G-WP
vlc shows it as PCM S16 BE (s16b)
and ffprobe
Stream #0:1: Audio: pcm_s16be, 16000 Hz, 1 channels, s16, 256 kb/s
VTO do accept audio via API in ulaw. I believe that VTO supporting g.711 while using SIP protocol

Are you sure you can't change codec via camera Web UI?

Hmm, interesting ..there is a way to change audio codec using Onvif
https://github.com/blakeblackshear/frigate/discussions/2572

There's likely a way to change it.  I can't change it with Amcrest tools but I could change mine with this:
https://dahuawiki.com/ConfigTool

So yeah, it's working. I did used this Happytime onvif client and  I hope this settings will stay for ever. If not I will reopen this issue, and ask for help with automating this change.
[
{
"media:0": "video, sendonly, 96 H264/90000",
"media:1": "audio, sendonly, 0 PCMU/8000",
"media:2": "application, sendonly, 107 VND.ONVIF.METADATA/90000",
"media:3": "audio, recvonly, 0 PCMU/8000",
"receive": 8279516,
"remote_addr": "<IP_ADDRESS>:554",
"send": 993960,
"track:0": "0 PCMU/8000, sinks=1",
"track:1": "0 PCMU/8000, sinks=1",
"type": "RTSP client producer",
"url": "rtsp://<IP_ADDRESS>:554/cam/realmonitor?channel=1\u0026subtype=0\u0026unicast=true\u0026proto=Onvif/"
},
{
"receive": 883680,
"remote_addr": "udp4 host <IP_ADDRESS>:61346",
"send": 8292693,
"type": "WebRTC server consumer",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Safari/605.1.15"
}
]

@luzik is 2-way audio working for you?

Yeah, latency i low and we are ready to build video doorbell intercom, the only problem is to switch audio codec in programming way. I believe that this could be in scope of this project :)

It is possible to change parameters without onvif client.
To get possible audio/video parameters:
http://admin:pass@<IP_ADDRESS>/cgi-bin/configManager.cgi?action=getConfig&name=Encode
For example to change audio bitrate to 8khz:
http://admin:pass@<IP_ADDRESS>/cgi-bin/configManager.cgi?action=setConfig&Encode[0].MainFormat[0].Audio.Depth=8
I have VTO2211G. It should work on other models.
ps: microphone in chrome doesn't work without https connection

That's a fantastic news for me, because my vto2211g did go to its defaults "L16/16000".
Does go2rtc can give support for such behave ? ..I mean if camera returning L16 try such action and try reconnect

This approach is a little intrusive, perhaps some kind of automatic codec conversion would be a little better. Refs:

#56

I think the ideal solution would be to:

Report the issue to Dahua, ask them to either make the audio codec selectable from the admin page or prevent it from reverting back to the original codec after some time

But I do understand that it's very unlikely that they would provide any support. Another option would be to look for alternative firmwares, like OpenIPC (which may be already compatible).
That's because, supposedly, this is a camera-specific requirement (other cameras/doorbells allows you to set the codec from their UI).

force_vto_codec=true

If I'm not mistaken, this is an ONVIF configuration (not something specific to VTO), which could potentially mean it would work for other cameras, from other manufactures even. Maybe a better name would be try_adjusting_onvif_audio_codec=true.

Since the VTO seems to retain the audio codec configuration for at least some days, a workaround for now is to create a script that fixes the codec and configure it to run automatically every day at midnight in Home Assistant, for example.

to change bitrate from console:
curl --digest -u "admin:pass" -g "http://<IP_ADDRESS>/cgi-bin/configManager.cgi?action=setConfig&Encode[0].MainFormat[0].Audio.Depth=8"
@felipecrs dahua stops stream when trying to change bitrate, but continue stream if bitrate is the same already. So I think it's better to execute script before start streaming in go2rtc.
I tried something like:
 vto:
    - exec:curl --digest -u "admin:pass" -g "http://<IP_ADDRESS>/cgi-bin/configManager.cgi?action=setConfig&Encode[0].MainFormat[0].Audio.Depth=8"
    - rtsp://admin:pass@<IP_ADDRESS>/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif

vto:
  - exec:curl --digest -u "admin:pass" -g "http://<IP_ADDRESS>/cgi-bin/configManager.cgi?action=setConfig&Encode[0].MainFormat[0].Audio.Depth=8";ffmpeg -i rtsp://admin:pass@<IP_ADDRESS>/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif -vcodec copy -c copy -rtsp_transport tcp -f rtsp {output}

You can use echo source. This is bash script that should print (echo) link to the stream. So you can change codec there.

Wow. This is brilliant. Really amazing, the possibilities are endless!

I wrote simple script to check bitrate parameter before start stream. I included sleep to give dahua time to restart rtsp stream.
#!/bin/bash
array=`curl -s --digest -u "admin:pass" -g "http://<IP_ADDRESS>/cgi-bin/configManager.cgi?action=getConfig&name=Encode"`
value="table.Encode[0].MainFormat[0].Audio.Depth=16"

if [[ " ${array[@]} " == *"$value"* ]]; then
  curl -s --digest -u "admin:pass" -g "http://<IP_ADDRESS>/cgi-bin/configManager.cgi?action=setConfig&Encode[0].MainFormat[0].Audio.Depth=8"
  sleep 2
fi

@AlexxIT if I add several strings to source block like
vto:
  - echo: ....
  - ffmpeg: ....

are there executed sequentially or it is bad idea?

@bonuzzz you need to convert them all to echo. For example, your first echo should return the rtsp stream string, your second one should return the ffmpeg stream string.

By the way, I don't know if my VTO is different than yours or not, but the setting I need to adjust is:
table.Encode[0].MainFormat[0].Audio.Frequency=16000

Instead of Depth=16

This seems to be working well for me. @luzik I suggest you try it too.

Create the file /config/scripts/get_vto_stream.sh
Place the following contents on it, replace the host and password with your values:

#!/bin/bash

creds="admin:pass"
host="<IP_ADDRESS>"

# Attempt to sampling rate. It won't harm if it's already set.
curl --silent --digest --user "${creds}" --globoff \
    "http://${host}/cgi-bin/configManager.cgi?action=setConfig&Encode[0].MainFormat[0].Audio.Frequency=8000" >&2

echo "rtsp://${creds}@${host}/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif"

Give it execution permission: chmod +x /config/scripts/get_vto_stream.sh
Set your go2rtc.yaml:

streams:
  vto:
    - echo:/config/scripts/get_vto_stream.sh

@felipecrs

By the way, I don't know if my VTO is different than yours or not, but the setting I need to adjust is:
table.Encode[0].MainFormat[0].Audio.Frequency=16000

Instead of Depth=16

Of course frequency. Thanks. I didn't always get mic working in chrome, so tested several options besides frequency.
I have vto2211g model.
I advice to add sleep command to your script between switching frequency and strart streaming, because dahua  is not always finished restart own rtsp stream during 60 sec which go2rtc waits for them.
And my script also checking current parameter.

@felipecrs I have old 2021-07-14 V4.500.0000001.0.R
could you send the link for new fw please?

My model is different than yours...
Mine is:
https://www.dahuasecurity.com/products/All-Products/Video-Intercoms/IP-Series/Villa-Door-Station/Pro-Series/VTO2202F-P-S2
Yours is:
https://www.dahuasecurity.com/my/products/All-Products/Video-Intercoms/IP-Series/Villa-Door-Station/Pro-Series/VTO2211G-WP
(I think)
But there is a newer fw for you: V4.511.0000000.0.R.220523
Just head to the Downloads -> Firmware in the link above.

Thanks. I updated firmware, but unfortunately nothing is changed and audio/mic is not stable as I see in your video

I am using second stream as frigate source, and frequency change is to small in my case, so I wrote simple one minute crontab with
curl -s --digest -u "admin:pass" -g "http://IP/cgi-bin/configManager.cgi?action=getConfig&name=Encode" |grep 'table.Encode.0..MainFormat.0..Audio.Compression=G711' || curl -s --digest -u "admin:pass" -g "http://IP/cgi-bin/configManager.cgi?action=setConfig&Encode[0].MainFormat[0].Audio.Compression=G711&Encode[0].MainFormat[0].Audio.Frequency=8000&Encode[0].ExtraFormat[0].Audio.Compression=AAC"

Just for completeness, this is the final version of my script:
#!/bin/bash

set -eu

readonly creds='admin:pass'
readonly host='<IP_ADDRESS>'

curl --silent --digest --user "${creds}" --globoff \
    "http://${host}/cgi-bin/configManager.cgi?action=setConfig&Encode[0].MainFormat[0].Audio.Compression=G711&Encode[0].MainFormat[0].Audio.Frequency=8000" >&2 &

echo "rtsp://${creds}@${host}/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif"

Hi , Would appreciate your help setting my VTO3211D
https://www.dahuasecurity.com/products/productDetail/50437
In config below working - no microphone or sound,
stream:
  intercom_go2rtc: rtsp://admin:mypass@<IP_ADDRESS>:554/cam/realmonitor?channel=1&subtype=0

Same as in ur  VTO , can't change the audio settings via the gui ,
but able to get below infrom via curl:
curl -s --digest -u 'admin:mypass' --globoff "http://<IP_ADDRESS>/cgi-bin/configManager.cgi?action=getConfig&name=Encode" |grep '.Audio'

table.Encode[0].ExtraFormat[0].Audio.Bitrate=64
table.Encode[0].ExtraFormat[0].Audio.Compression=PCM
table.Encode[0].ExtraFormat[0].Audio.Depth=16
table.Encode[0].ExtraFormat[0].Audio.Frequency=16000
table.Encode[0].ExtraFormat[0].Audio.Mode=0
table.Encode[0].ExtraFormat[0].Audio.Pack=DHAV
table.Encode[0].ExtraFormat[0].AudioEnable=true
table.Encode[0].ExtraFormat[1].Audio.Bitrate=64
table.Encode[0].ExtraFormat[1].Audio.Compression=PCM
table.Encode[0].ExtraFormat[1].Audio.Depth=16
table.Encode[0].ExtraFormat[1].Audio.Frequency=16000
table.Encode[0].ExtraFormat[1].Audio.Mode=0
table.Encode[0].ExtraFormat[1].Audio.Pack=DHAV
table.Encode[0].ExtraFormat[1].AudioEnable=false
table.Encode[0].ExtraFormat[2].Audio.Bitrate=64
table.Encode[0].ExtraFormat[2].Audio.Compression=PCM
table.Encode[0].ExtraFormat[2].Audio.Depth=16
table.Encode[0].ExtraFormat[2].Audio.Frequency=16000
table.Encode[0].ExtraFormat[2].Audio.Mode=0
table.Encode[0].ExtraFormat[2].Audio.Pack=DHAV
table.Encode[0].ExtraFormat[2].AudioEnable=false
table.Encode[0].MainFormat[0].Audio.Bitrate=64
table.Encode[0].MainFormat[0].Audio.Compression=PCM
table.Encode[0].MainFormat[0].Audio.Depth=16
table.Encode[0].MainFormat[0].Audio.Frequency=16000
table.Encode[0].MainFormat[0].Audio.Mode=0
table.Encode[0].MainFormat[0].Audio.Pack=DHAV
table.Encode[0].MainFormat[0].AudioEnable=true
table.Encode[0].MainFormat[1].Audio.Bitrate=64
table.Encode[0].MainFormat[1].Audio.Compression=PCM
table.Encode[0].MainFormat[1].Audio.Depth=16
table.Encode[0].MainFormat[1].Audio.Frequency=16000
table.Encode[0].MainFormat[1].Audio.Mode=0
table.Encode[0].MainFormat[1].Audio.Pack=DHAV
table.Encode[0].MainFormat[1].AudioEnable=true
table.Encode[0].MainFormat[2].Audio.Bitrate=64
table.Encode[0].MainFormat[2].Audio.Compression=PCM
table.Encode[0].MainFormat[2].Audio.Depth=16
table.Encode[0].MainFormat[2].Audio.Frequency=16000
table.Encode[0].MainFormat[2].Audio.Mode=0
table.Encode[0].MainFormat[2].Audio.Pack=DHAV
table.Encode[0].MainFormat[2].AudioEnable=true
table.Encode[0].SnapFormat[0].Audio.Bitrate=64
table.Encode[0].SnapFormat[0].Audio.Compression=G.711A
table.Encode[0].SnapFormat[0].Audio.Depth=16
table.Encode[0].SnapFormat[0].Audio.Frequency=8000
table.Encode[0].SnapFormat[0].Audio.Mode=0
table.Encode[0].SnapFormat[0].Audio.Pack=DHAV
table.Encode[0].SnapFormat[0].AudioEnable=false
table.Encode[0].SnapFormat[1].Audio.Bitrate=64
table.Encode[0].SnapFormat[1].Audio.Compression=G.711A
table.Encode[0].SnapFormat[1].Audio.Depth=16
table.Encode[0].SnapFormat[1].Audio.Frequency=8000
table.Encode[0].SnapFormat[1].Audio.Mode=0
table.Encode[0].SnapFormat[1].Audio.Pack=DHAV
table.Encode[0].SnapFormat[1].AudioEnable=false
table.Encode[0].SnapFormat[2].Audio.Bitrate=64
table.Encode[0].SnapFormat[2].Audio.Compression=G.711A
table.Encode[0].SnapFormat[2].Audio.Depth=16
table.Encode[0].SnapFormat[2].Audio.Frequency=8000
table.Encode[0].SnapFormat[2].Audio.Mode=0
table.Encode[0].SnapFormat[2].Audio.Pack=DHAV
table.Encode[0].SnapFormat[2].AudioEnable=false

I tried using &proto=Onvif but it doesnt work (no video started, confirm also on vlc)
getting 401 error .
would appreciate your help

By default HA shows streams in HLS format. It support same codecs as MSE, but also works on iPhones:
https://github.com/AlexxIT/go2rtc#codecs-madness

By default HA shows streams in HLS format. It support same codecs as MSE, but also works on iPhones: https://github.com/AlexxIT/go2rtc#codecs-madness

Thanks @AlexxIT
yes , on mobile i do get the sound but not via chrome .
is it possible to enable the micophone ?
Basically till I got to go2rc i use the webrtc on HA and its working amazingly (before it - i just give up using camers on HA).
But i can't tell or see the big advantage of moving to go2rtc in the context of use in home assistant .
Will the latency suppose to improve?
I'm not sure but based on this post Microphone supposed to work ?

Different users have different needs. Some people are satisfied with frequent snapshot updates. By the way HomeKit cameras in HA do exactly that.

Is mse.html supposed to support 2-way audio? For me it's only working on webrtc.html and I wonder if it's a limitation of the player itself or codec/format issues.

Is mse.html supposed to support 2-way audio? For me it's only working on webrtc.html and I wonder if it's a limitation of the player itself or codec/format issues.

Based on AlexxIt's response in the other issue I don't think it does natively. Seems WebRTC does but MSE would need an alternate solution to support two way audio:

Without WebRTC, you have to find other ways to encode and transmit. Also in both directions. In case of MSE, it is Media Source Extensions + WebSocket for receiving data.

wow, this is way over my head. I have a VTO2211G-WP. Please advise what do I have to do to get video and audio feed to my frigate.

Ok, I have some unfortunate news.
When using this trick to have 2-way audio working in go2rtc with VTO, the SIP calling with the Asterisk add-on stops working properly.
The error in Asterisk logs are:
[Dec 21 12:06:06] DEBUG[599][C-00000004]: chan_pjsip.c:897 chan_pjsip_read_stream: Oooh, got a frame with format of alaw on channel 'PJSIP/8001-00000004' when it has not been negotiated

And no one seems to know how to fix it from Asterisk side.

This may be another reason in favor of https://github.com/AlexxIT/go2rtc/issues/105.

3. chmod +x /config/scripts/get_vto_stream.sh

Just for completeness, this is the final version of my script:
#!/bin/bash

set -eu

readonly creds='admin:pass'
readonly host='<IP_ADDRESS>'

curl --silent --digest --user "${creds}" --globoff \
    "http://${host}/cgi-bin/configManager.cgi?action=setConfig&Encode[0].MainFormat[0].Audio.Compression=G711&Encode[0].MainFormat[0].Audio.Frequency=8000" >&2 &

echo "rtsp://${creds}@${host}/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif"

i'm getting this error

Are you running go2rtc via docker? You should mount the script into the container.

I m running it as addon on homeassistant

Try to call this script from the Terminal add-on, it should work too. That should help you debug it before passing in to go2rtc.

Try to call this script from the Terminal add-on, it should work too. That should help you debug it before passing in to go2rtc.

sorry for my inexperience, is this the command?

makes sense. line endings issue.

@felipecrs @morpheus8888 I've been trying to set this up on my Dahua WP2111D-WP. Interestingly enough I can send sound to the camera with Tinycam but can't hear the mic. In go2rtc it is exactly the other way around. I can hear the camera mic but I can't get output from the speaker in the camera.
Below the info on the stream. Can you see something I'm missing here?
{   "producers": [     {       "type": "RTSP active producer",       "url": "rtsp://<IP_ADDRESS>:554/cam/realmonitor?channel=1\u0026subtype=0/",       "remote_addr": "<IP_ADDRESS>:554",       "user_agent": "go2rtc/1.4.0",       "medias": [         "video, recvonly, H.264 High 3.1",         "audio, recvonly, L16/16000"       ],       "receivers": [         "96 H264, bytes=32351736, senders=1",         "97 L16/16000, bytes=2689920, senders=1"       ],       "recv": 35397456     },     {       "url": "echo:/config/scripts/get_vto_stream.sh"     }   ],   "consumers": [     {       "type": "WebRTC/WebSocket async passive consumer",       "remote_addr": "udp4 host <IP_ADDRESS>:56785",       "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36 Edg/112.0.1722.48",       "medias": [         "video, sendonly, VP8, RTX, VP9, H264, AV1, RED, ULPFEC, FLEXFEC-03",         "audio, sendonly, OPUS/48000/2, RED/48000/2, G722/8000, PCMU/8000, PCMA/8000, CN/8000, TELEPHONE-EVENT/48000, TELEPHONE-EVENT/8000"       ],       "senders": [         "102 H264, bytes=32351736, receivers=1",         "8 PCMA/8000, bytes=2689920, receivers=1"       ],       "send": 33441026     }   ] }

@Heronimonimo There is no back audio in your info.
Check if the camera has any other RTSP connections with the microphone turned on. Because only one can be active simultaneously

@AlexxIT This is with an active stream with microphone turned on. Any idea what Tinycam does to get it working out of the box?
{
  "producers": [
    {
      "type": "RTSP active producer",
      "url": "rtsp://<IP_ADDRESS>:554/cam/realmonitor?channel=1\u0026subtype=0/",
      "remote_addr": "<IP_ADDRESS>:554",
      "user_agent": "go2rtc/1.4.0",
      "medias": [
        "video, recvonly, H.264 High 3.1",
        "audio, recvonly, L16/16000"
      ],
      "receivers": [
        "96 H264, bytes=14440515, senders=1",
        "97 L16/16000, bytes=841600, senders=1"
      ],
      "recv": 15426451
    },
    {
      "url": "echo:/config/scripts/get_vto_stream.sh"
    }
  ],
  "consumers": [
    {
      "type": "WebRTC/WebSocket async passive consumer",
      "remote_addr": "udp4 host <IP_ADDRESS>:63200",
      "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36 Edg/112.0.1722.48",
      "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"
      ],
      "receivers": [
        "111 OPUS/48000/2, bytes=186635, senders=0"
      ],
      "senders": [
        "102 H264, bytes=14440515, receivers=1",
        "8 PCMA/8000, bytes=841600, receivers=1"
      ],
      "recv": 241075,
      "send": 14826563
    }
  ]
}

This is the output using your rtsplog tool. It seems to show a sendonly track.

2023/05/01 09:11:27 RTSP/1.0 200 OK
CSeq: 2
Public: OPTIONS, DESCRIBE, ANNOUNCE, SETUP, PLAY, RECORD, PAUSE, TEARDOWN, SET_PARAMETER, GET_PARAMETER
Server: Rtsp Server/3.0

2023/05/01 09:11:27 RTSP/1.0 200 OK
CSeq: 3
Cache-Control: must-revalidate
Content-Base: rtsp://<IP_ADDRESS>:554//
Content-Length: 573
Content-Type: application/sdp
X-Accept-Dynamic-Rate: 1

v=0
o=-<PHONE_NUMBER><PHONE_NUMBER> IN IP4 <IP_ADDRESS>
s=Media Server
c=IN IP4 <IP_ADDRESS>
t=0 0
a=control:*
a=packetization-supported:DH
a=rtppayload-supported:DH
a=range:npt=now-
m=video 0 RTP/AVP 96
a=control:trackID=0
a=framerate:30.000000
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=64001F;sprop-parameter-sets=Z2QAH6y0AoAt0qQAAAMABAAAAwDxgQAA+f8AAEZP+974XhEI1AA=,aM48MAA=
a=recvonly
m=audio 0 RTP/AVP 97
a=control:trackID=1
a=rtpmap:97 L16/16000
a=recvonly
m=audio 0 RTP/AVP 97
a=control:trackID=5
a=rtpmap:97 L16/16000
a=sendonly
2023/05/01 09:11:27 available tracks: [0xc00010a660 0xc00010a6c0 0xc00010a720]

@Heronimonimo
Interesting. I can see back track in the response. But can't see it in the go2rtc info.
Maybe it some bug with SDP. Some unprinted symbol.
Also you have PCM codec and need to use bash script as shown above.

@AlexxIT anything I can do on my side to help resolve this issue?

@AlexxIT tried setting all kind of codecs trough the bash script, but that doesn't seem to work. It gives choppy audio and still no return channel.

You can enable trace log for rtsp module and check if backchannel codec changes with bash script in SDP response.
Without that there is no point to fix problem in SDP.

Guys, it is kinda crazy but 2-way audio for me is now working without having to change the codec. I just have:
streams:
  video_porteiro:
    - rtsp://admin:password@<IP_ADDRESS>/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif
    - "ffmpeg:video_porteiro#audio=aac"

And it is working! (Dahua VTO 2202F-P-S2) (previously I needed the script otherwise 2-way audio would not work).

Ok, not so fast. It was indeed working, but as I had previously noticed my VTO likes to change its own codec automatically.
However, previously I had given up on 2-way audio with go2rtc because changing its codec would stop my SIP audio communication.
The good news is that, I found another codec which works for both 2-way audio in go2rtc and also with SIP (L16/16000). Here is how I'm currently configuring my VTO:
# /config/go2rtc.yaml

streams:
    video_porteiro:
      # two-way audio, L16/16000
      - echo:/config/scripts/get_vto_stream.sh<EMAIL_ADDRESS>cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif
      # AAC/16000
      - rtsp://admin:QVR7xry5urq0hdn!ybr@<IP_ADDRESS>/cam/realmonitor?channel=1&subtype=1#media=audio
    video_porteiro_hd:
      # only video, no two-audio either
      - rtsp://admin:QVR7xry5urq0hdn!ybr@<IP_ADDRESS>/cam/realmonitor?channel=1&subtype=1#media=video
      # copy all audio codecs from first stream
      - rtsp://<IP_ADDRESS>:8554/video_porteiro?audio=all

#!/bin/bash
# /config/scripts/get_vto_stream.sh

set -eu

readonly host_with_creds="${1}"
readonly stream_path="${2}"

# changes the first channel codec to be L16/16000
# changes the second channel codec to be AAC/16000
curl --fail --silent --show-error --digest --globoff \
  "http://${host_with_creds}/cgi-bin/configManager.cgi?action=setConfig&Encode[0].MainFormat[0].Audio.Compression=PCM&Encode[0].MainFormat[0].Audio.Frequency=16000&Encode[0].ExtraFormat[0].Audio.Compression=AAC&Encode[0].ExtraFormat[0].Audio.Frequency=16000" >&2

echo "rtsp://${host_with_creds}/${stream_path}"

And now I don't require any codecs conversion in my go2rtc anymore, which saves me some good CPU cycles.
However, I am still having some small issues:

https://github.com/AlexxIT/go2rtc/issues/685

Ok, not so fast. It was indeed working, but as I had previously noticed my VTO likes to change its own codec automatically.
However, previously I had given up on 2-way audio with go2rtc because changing its codec would stop my SIP audio communication.
The good news is that, I found another codec which works for both 2-way audio in go2rtc and also with SIP (L16/16000). Here is how I'm currently configuring my VTO:
# /config/go2rtc.yaml

streams:
    video_porteiro:
      # two-way audio, L16/16000
      - echo:/config/scripts/get_vto_stream.sh<EMAIL_ADDRESS>cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif
      # AAC/16000
      - rtsp://admin:password@<IP_ADDRESS>/cam/realmonitor?channel=1&subtype=1#media=audio
    video_porteiro_hd:
      # only video, no two-audio either
      - rtsp://admin:password@<IP_ADDRESS>/cam/realmonitor?channel=1&subtype=1#media=video
      # copy all audio codecs from first stream
      - rtsp://<IP_ADDRESS>:8554/video_porteiro?audio=all

#!/bin/bash
# /config/scripts/get_vto_stream.sh

set -eu

readonly host_with_creds="${1}"
readonly stream_path="${2}"

# changes the first channel codec to be L16/16000
# changes the second channel codec to be AAC/16000
curl --fail --silent --show-error --digest --globoff \
  "http://${host_with_creds}/cgi-bin/configManager.cgi?action=setConfig&Encode[0].MainFormat[0].Audio.Compression=PCM&Encode[0].MainFormat[0].Audio.Frequency=16000&Encode[0].ExtraFormat[0].Audio.Compression=AAC&Encode[0].ExtraFormat[0].Audio.Frequency=16000" >&2

echo "rtsp://${host_with_creds}/${stream_path}"

And now I don't require any codecs conversion in my go2rtc anymore, which saves me some good CPU cycles.
However, I am still having some small issues:

https://github.com/AlexxIT/go2rtc/issues/685

I'm having the same problem. Regarding codecs, I think there might be something going on the go2rtc side.
@AlexxIT if you notice here, there is a sendonly track on the rtsp feed, which does not seem to be used (no "senders" list is present). In this case, the send track is using L16/16000.

If I change the send track to PCMA/8000, it then works.

Any ideas how to get L16/16000 working? Main reason is that SIP (the doorbell monitor) will break audio if using PCMA/8000.

@oNaiPs can you please clarify how did you change the backchannel codec? I was only able to change the stream codec so far.
However, this is how my sendonly looks like:
"audio, sendonly, MPEG4-GENERIC/16000, MPEG4-GENERIC/8000, PCMU/16000, PCMU/8000, PCMA/16000, PCMA/8000, L16/8000, L16/16000"

L16 for backchannel not supported for now

L16 for backchannel not supported for now

Do you think it would be possible to support it? If yes, would you like a separate issue to track support for L16 on backchannel?

Yes. I have code for transcoding L16 to PCMU/PCMA. And can do opposite task. Just hard to put it in right place and not to break anything else.

Thanks a lot, I have opened the issue here.

@Heronimonimo I am just seeing your message now. Are not you missing the proper parameters in the RTSP link?
Mine looks like this:
rtsp://admin:pass@<IP_ADDRESS>/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif

And if I remove &unicast=true&proto=Onvif, backchannel disappears (just like in your screenshot :))

Info about Dahua url was in very first docs:
https://github.com/AlexxIT/go2rtc/tree/v0.1-alpha.1#rtsp-source

@oNaiPs can you please clarify how did you change the backchannel codec? I was only able to change the stream codec so far.

@felipecrs check below, you just need to call the following URLs (on your browser for example):
// change to L16/16000
http://admin:pass@ip_addr/cgi-bin/configManager.cgi?action=setConfig&Encode[0].MainFormat[0].Audio.Compression=G.711A&Encode[0].MainFormat[0].Audio.Frequency=8000

//change to PCMA/8000
http://admin:pass@ip_addr/cgi-bin/configManager.cgi?action=setConfig&Encode[0].MainFormat[0].Audio.Compression=PCM&Encode[0].MainFormat[0].Audio.Frequency=16000

//get available codecs
http://admin:pass@ip_addr/cgi-bin/encode.cgi?action=getConfigCaps

//get current setting
http://admin:pass@ip_addr/cgi-bin/configManager.cgi?action=getConfig&name=Encode[0].MainFormat[0].Audio

Hm... that's funny. When I call such endpoints Encode[0].MainFormat[0], the codec from the backchannel does not change. Only the regular audio track from the main channel is changed.

Hm... that's funny. When I call such endpoints Encode[0].MainFormat[0], the codec from the backchannel does not change. Only the regular audio track from the main channel is changed.

@felipecrs appologies I just noticed the URLs were wrong.. can you check again? (edited)

Well, the only difference between you and me is that I set only Compression and Frequency, you also change Depth and Bitrate.
Anyway. Let's see if things changes for you after the newest firmware.

@felipecrs I can confirm that you need to change all of those to make a real change in the backchannel codec (i was trying to simplify before writing the post, and that's why it got broken).
One thing I know, is that for 2 way audio to be working, the "producer" (rtsp camera) needs to have a "sender" defined and in the "consumer" (webrtc) a "receiver" needs to be defined. I could only get this to work when my backchannel codec is defined as either PCMA/8000 or PCMU/8000.
Did the firmware upgrade, 2 way audio seems to be working but didnt' confirm with the monitor (VTH5321GB) which I also upgraded since its late here. However, looks promising, since there's no more garbled sound coming from it (that's the problem I was having after changing the codec in the VTO).

@felipecrs I'm curious, what is the second channel for and why do you change it to AAC?

Oh, that's not necessary for you if you don't use Frigate.
Frigate needs an AAC audio track for recordings.
Adjusting the substream to output in AAC prevents me from having to do the conversion with ffmpeg and thus saves me some good CPU cycles.

Hello,
Can You send all of the Your config files? Like:
go2rtc.yaml
frigate
frigate card 2way audio

Hi everyone - I have Dahua VTO2311R-WP doorbell and  I'm struggling to achieve a solution like:

dorbell stream being connected to frigate for recording (ideally - with sound)
2-way audio with video card for opening when someone calls the door (that would be opened on my wall-mounted Android tablet)
retain Dahua's app (DMSS) support for answering calls from VTO (I have that app installed on my phone, so I can answer doorbell when I'm outside of the house)
Is that configuration possible to achieve? I'm usually quite good with configuring stuff like that, but to be honest learning curve is a bit too steep over here for me, and I feel a bit lost :) Currently feature no 1 and 3 (frigate and DMSS) are up and running in my setup, so it's down to implementing feature no 2 without breaking behavior of the other ones :P

Working config for DHI-VTO2202F-P-S2 with 2 way audio on HD or SD, and SIP with 2 way audio+video:
If you use the app for the VTO, these settings will be changed on demand and the go2rtc streams will break.
Note the script uses different credentials for the configuration and for the stream.
Admin credentials are the ones for the WebUI administrator account.
Onvif credentials: WebUI->Local>Onvif User->Add
#!/bin/bash
set -euo pipefail

readonly admincreds='adminuser:adminpass'
readonly onvifcreds='onvifuser:onvifpass'
readonly host='<IP_ADDRESS>'
readonly path="${1}"

params=""
params+="&Encode[0].MainFormat[0].Audio.Compression=G.711A" # Chrome WebRTC backchannel codec restrictions.
params+="&Encode[0].MainFormat[0].Audio.Frequency=8000" # Chrome WebRTC backchannel codec restrictions.
params+="&Encode[0].MainFormat[0].Audio.Bitrate=64"
params+="&Encode[0].ExtraFormat[0].Audio.Compression=AAC" # For use with Frigate
params+="&Encode[0].ExtraFormat[0].Audio.Frequency=16000"
params+="&Encode[0].ExtraFormat[0].Audio.Bitrate=64"

params+="&Encode[0].MainFormat[0].Video.GOP=4" # Optional, read considerations

curl --fail --silent --show-error --digest --globoff --user "${admincreds}" \
  "http://${host}/cgi-bin/configManager.cgi?action=setConfig${params}" >&2

echo "rtsp://${onvifcreds}@${host}${path}"

streams:
  vto_sd_2wayaudio:
    # MainFormat: PCMA/8000, 2-way audio, H264
    - echo:/config/vto_setup_stream.sh "/cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif"
  vto_hd_2wayaudio:
    # ExtraFormat: H264. Must be first to be served to the client by default.
    - echo:/config/vto_setup_stream.sh /cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif#media=video#backchannel=0
    # MainFormat: PCMA/8000, 2-way audio, H264. Currently no way of disabling video stream while keeping 2 way audio?
    - echo:/config/vto_setup_stream.sh /cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif
  vto_hd_frigate:
    # ExtraFormat: MPEG4-GENERIC/16000, H264
    - echo:/config/vto_setup_stream.sh /cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif

You can of course reuse stream connections, but keep in mind backchannel will not be redirected.
Considerations:
In this camera MainStream is intended for low quality real time and ExtraStream (SubStream in the WebUI) for HD recording.
Using 2 way audio:
Only MainStream or ExtraStream can receive an audio stream at a given time.
If you open a stream to MainStream and another one to ExtraStream, the second one will not have the audio backchannel, and you will have to both close the first one and reconnect the second one to switch.
You can however have multiple 2 way audio clients to the same stream, but instead of mixing the audio at the VTO speaker as you would expect, audio is played sequentially by chunks and independently
Delay starts accumulating and it is unusable until all the audio sent ends playing, which can take some time even after you close the stream.
SIP is like a extra connection using MainStream, same quirks apply.
Conclusion: only one audio sender at any given time. For regular audio/video receiving this does not apply.
GOP Setting
Max time between each complete frame, so you receive one sooner and video initial load is faster. This has special effect if you use low fps (like 4) and a standard gop like 50, it can take up to ~50/4=12.5s for the video to start. Drawback is it sends more data more often.
L16 Codec
Currently not supported by go2rtc for backchannel.
It does show up on go2rtc via onvif, but http://admin:pass@ip_addr/cgi-bin/encode.cgi?action=getConfigCaps does not list it as supported, strange.
PCMA also achieves go2rtc 2 way audio + SIP and it is way less bandwidth intensive.
Maybe using it will solve the 2 way audio quirks mentioned before?

Thanks to @felipecrs and @oNaiPs for the clues.

This was a really great summary, @miguelangel-nubla. I am also hopeful that 2-way audio through CGI can help overcome some of these limitations, especially the need of configuring codecs and, perhaps even the concurrency problem.

Working config for DHI-VTO2202F-P-S2 with 2 way audio on HD or SD, and SIP with 2 way audio+video:
If you use the app for the VTO, these settings will be changed on demand and the go2rtc streams will break.
Note the script uses different credentials for the configuration and for the stream. Admin credentials are the ones for the WebUI administrator account. Onvif credentials: WebUI->Local>Onvif User->Add
#!/bin/bash
set -euo pipefail

readonly admincreds='adminuser:adminpass'
readonly onvifcreds='onvifuser:onvifpass'
readonly host='<IP_ADDRESS>'
readonly path="${1}"

params=""
params+="&Encode[0].MainFormat[0].Audio.Compression=G.711A" # Chrome WebRTC backchannel codec restrictions.
params+="&Encode[0].MainFormat[0].Audio.Frequency=8000" # Chrome WebRTC backchannel codec restrictions.
params+="&Encode[0].MainFormat[0].Audio.Bitrate=64"
params+="&Encode[0].ExtraFormat[0].Audio.Compression=AAC" # For use with Frigate
params+="&Encode[0].ExtraFormat[0].Audio.Frequency=16000"
params+="&Encode[0].ExtraFormat[0].Audio.Bitrate=64"

params+="&Encode[0].MainFormat[0].Video.GOP=4" # Optional, read considerations

curl --fail --silent --show-error --digest --globoff --user "${admincreds}" \
  "http://${host}/cgi-bin/configManager.cgi?action=setConfig${params}" >&2

echo "rtsp://${onvifcreds}@${host}${path}"

streams:
  vto_sd_2wayaudio:
    # MainFormat: PCMA/8000, 2-way audio, H264
    - echo:/config/vto_setup_stream.sh /cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif
  vto_hd_2wayaudio:
    # ExtraFormat: H264. Must be first to be served to the client by default.
    - echo:/config/vto_setup_stream.sh /cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif#media=video#backchannel=0
    # MainFormat: PCMA/8000, 2-way audio, H264. Currently no way of disabling video stream while keeping 2 way audio?
    - echo:/config/vto_setup_stream.sh /cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif
  vto_hd_frigate:
    # ExtraFormat: MPEG4-GENERIC/16000, H264
    - echo:/config/vto_setup_stream.sh /cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif#media=audio+video#backchannel=0

You can of course reuse stream connections, but keep in mind backchannel will not be redirected.
My personal configuration
streams:
  vto:
    # ExtraFormat: MPEG4-GENERIC/16000 (ACC), H264. Frigate without transcoding.
    - echo:/config/vto_setup_stream.sh /cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif#media=audio+video#backchannel=0
    # Conversion from best source (ACC) to opus for WebRTC support.
    - ffmpeg:vto#audio=opus#async
    # MainFormat: PCMA/8000, 2-way audio, H264. 2 way audio last resort, so regular WebRTC or Frigate client does not block backchannel for other 2way audio client
    - echo:/config/vto_setup_stream.sh /cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif
  vto_fast:
    # MainFormat: PCMA/8000, 2-way audio, H264
    - echo:/config/vto_setup_stream.sh /cam/realmonitor?channel=1&subtype=0&unicast=true&proto=Onvif

Considerations:
In this camera MainStream is intended for low quality real time and ExtraStream (SubStream in the WebUI) for HD recording.
Using 2 way audio:
Only MainStream or ExtraStream can receive an audio stream at a given time.
If you open a stream to MainStream and another one to ExtraStream, the second one will not have the audio backchannel, and you will have to both close the first one and reconnect the second one to switch. You can however have multiple 2 way audio clients to the same stream, but instead of mixing the audio at the VTO speaker as you would expect, audio is played sequentially by chunks and independently Delay starts accumulating and it is unusable until all the audio sent ends playing, which can take some time even after you close the stream.
SIP is like a extra connection using MainStream, same quirks apply. Conclusion: only one audio sender at any given time. For regular audio/video receiving this does not apply.
If you use Frigate, make sure it is not using your 2 way audio channel with #media=audio+video#backchannel=0, as shown in the example
GOP Setting
Max time between each complete frame, so you receive one sooner and video initial load is faster. This has special effect if you use low fps (like 4) and a standard gop like 50, it can take up to ~50/4=12.5s for the video to start. Drawback is it sends more data more often.
L16 Codec = PCM
Currently not supported by go2rtc for backchannel. ~It does show up on go2rtc via onvif, but http://admin:pass@ip_addr/cgi-bin/encode.cgi?action=getConfigCaps does not list it as supported, strange.~ PCMA also achieves go2rtc 2 way audio + SIP and it is way less bandwidth intensive. Maybe using it will solve the 2 way audio quirks mentioned before?
Thanks to @felipecrs and @oNaiPs for the clues.

sorry I am somewhat of a newbe when it comes to go2rtc and all this so please baer with me. I have read this whole thread as well as others and still I have several questions.
My Setup is as follows:
Doorbell: DHI-VTO2202F-P-S2
go2rtc is running on Home Assistant (VM) go2rtc Master Hardware
I have the Home Assistant Dahua Integration from rroller installed and my doorbell configured
I have the frigate lovelace card installed
Frigate is up and running as a seperate docker container on my server (which also runs the home assistant VM - all my cams including the doorbell are visible both on frigate itself as well as the home assistant frigate lovelace card)
1.) I don't get at all where exactly to put the script - where exactly do I have to put it - when edit the yaml as you mentioned above go2rtc gives me 3 streams but whenever I click on one I get mse: streams: fork/exec /config/vto_setup_stream.sh no such file or directory - which is no surprise but I am at a loss where I can put it so that it actually works
2.) the following is my frigate card in home assistant:
type: custom:frigate-card
cameras:
  - camera_entity: camera.hausturcam
    live_provider: go2rtc
    go2rtc:
      modes:
        - webrtc
menu:
  style: outside
  position: bottom
  buttons:
    microphone:
      enabled: true
      type: toggle
    screenshot:
      enabled: false
    download:
      enabled: false
    fullscreen:
      enabled: false
    snapshots:
      enabled: false
    timeline:
      enabled: false
    media_player:
      enabled: false
    clips:
      enabled: false
    live:
      enabled: false
    cameras:
      enabled: false
    frigate:
      enabled: false
    camera_ui:
      enabled: false
live:
  auto_mute: never
  controls:
    builtin: true
    title:
      mode: none
  layout:
    fit: fill
elements:
  - type: custom:frigate-card-menu-icon
    icon: mdi:volume-high
    tap_action:
      - action: custom:frigate-card-action
        frigate_card_action: unmute
  - type: custom:frigate-card-menu-icon
    icon: mdi:volume-off
    tap_action:
      - action: custom:frigate-card-action
        frigate_card_action: mute
  - type: custom:frigate-card-menu-icon
    icon: mdi:phone
    tap_action:
      - action: call-service
        service: button.press
        service_data:
          entity_id: button.ds_kh9510_answer_call
      - action: custom:frigate-card-action
        frigate_card_action: unmute
      - action: custom:frigate-card-action
        frigate_card_action: microphone_unmute
  - type: custom:frigate-card-menu-icon
    icon: mdi:phone-hangup
    tap_action:
      - action: custom:frigate-card-action
        frigate_card_action: microphone_mute
dimensions:
  aspect_ratio_mode: static
  aspect_ratio: '16:9'

this shows the cam live with buttons for answering call and declining call as well as increase and decrease volume.
Answering call does not work (which I can understand since i don't have an entity_id button.ds_kh9510_answer_call
3) I have an automation for the doorbell:
alias: kingel
description: ""
trigger:
  - platform: state
    entity_id:
      - binary_sensor.hausturklingel_button_pressed
    from: null
    to: "on"
condition: []
action:
  - parallel:
      - service: notify.mobile_app_pixel_5
        data:
          message: Es hat geklingelt
          title: Haustür
          image: /api/camera_proxy/camera.hausturklingel_main
      - service: notify.mobile_app_pixel_6_pro
        data:
          message: Es hat geklingelt
          title: Haustür
          image: /api/camera_proxy/camera.hausturklingel_main
      - service: camera.play_stream
        metadata: {}
        data:
          format: hls
          media_player: media_player.flur
        target:
          device_id: f63a33b8fa0d196f0e2ebe780416f8ab
      - delay:
          hours: 0
          minutes: 5
          seconds: 0
          milliseconds: 0
      - service: media_player.media_stop
        metadata: {}
        data: {}
        target:
          device_id: 528dccc697e42cdb68fb35c4a90e6808
mode: single

this sort of works...
It plays a live stream on my google nest (with audio but only receiving audio from the doorbell - and it's quite laggy I'd say up to 30 seconds)
it does not show up the notifications on the smartphones (which i do not care about right now - I just want to get the 2 way audio working on the frigate card)
Can someone please help me out. Thank you all for your understanding you're doing great work!

well i would accept the delay as far as it is somewhat working

i am sorry maybe i misunderstood - do you mean if i change the rtsp stream to multipart the 2 way audio might(?) work?

No, I just said that maybe someday go2rtc will allow to perform 2-way audio through Dahua's CGI interface, and then it may work better.
2-way audio through backchannel with the VTO is already possible. Scroll up in the conversation, many people proposed working solutions.

If you tried to work with a VTO, I'd recommend you first try with a regular Dahua 2-way audio camera. VTO's firmware is a true mess. (I don't have any regular cameras though)

I need physical access to Dahua with this CGI. Tried to add support remotely without big success.

If you happen to live in the neighborhood (so to say) I could send mine to you (if I get it back in working condition)

Just to set expectations of newcomers to this thread:
I am not aware of any reliable approach to use go2rtc (with something like WebRTC card) to replace a SIP-based system for 2-way audio communication with a Dahua VTO.
Today I tried putting together everything I've learned about this to make it work (so far I have been using the SIP card as daily driver), and unfortunately I stumbled upon: https://github.com/AlexxIT/go2rtc/issues/1133

@miguelangel-nubla, one thing I realized is that if I set:
  "Encode[0].ExtraFormat[0].Audio.Compression=AAC"
  "Encode[0].ExtraFormat[0].Audio.Frequency=8000"

AAC to 8000Hz, the VTO will in fact serve 16000. If I set 16000 like you are doing, it will serve 32000Hz.
I suggest you test it as well, I suppose your goal was to have AAC/16000 with your config above and not AAC/32000.
So, I ended up with:
  "Encode[0].MainFormat[0].Audio.Compression=G.711A"
  "Encode[0].MainFormat[0].Audio.Frequency=8000"
  "Encode[0].ExtraFormat[0].Audio.Compression=AAC"
  "Encode[0].ExtraFormat[0].Audio.Frequency=8000"

I found it unnecessary to change the bitrate. It already defaults to 64.
Setting a lower frequency for AAC breaks it. 8000 -> 16000 is the minimum.
8000 for G.711A is also the default I think. I am setting it just in case.

I am satisfied with my current setup. I am not using VTH nor the Dahua app to answer the doorbell, I am only using Home Assistant itself.
I am documenting it here: https://github.com/felipecrs/dahua-vto-on-home-assistant

I just added a video demonstration on how it's working for me.


Documentation edit

For consistency, should Step 2. in this document reference "workspace1_SynapseAdministrators" instead of "Assign the Storage Blob Data Contributor role to workspace1_SynapseAdmins"?

STEP 7.3: SL access control for workspace pipeline runs    Supposed to be SQL access

Thanks, Eric

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 1149f92f-5b95-7b27-5525-db4f792d7937
Version Independent ID: 60242818-539c-6e91-7dc8-222ccc383574
Content: How to set up access control for your Synapse workspace - Azure Synapse Analytics
Content Source: articles/synapse-analytics/security/how-to-set-up-access-control.md
Service: synapse-analytics
Sub-service: security
GitHub Login: @billgib
Microsoft Alias: billgib

@ESTOCKY
Thanks for your feedback! We will investigate and update as appropriate.

Thank you! I made a pull request to fix the name. https://github.com/MicrosoftDocs/azure-docs-pr/pull/140720
It looks like someone else already fixed the SL/SQL typo.


SDK Restructure

We currently have 26 packages in the packages directory. This is an unnecessary level of abstraction that increases build, watch, install and test times. We should look to restructure packages into a smaller logical structure. Further to this, some that were acting as a bridge between packages may be deprecated when relocated if this now makes logical sense (i.e. @fuel-ts/testcases). This issue will act as a topic for all restructuring activities.
Proposed Structure

@danielbate Thanks for creating the issue.
Should we have individual issues per group, though?

@arboleya agreed. I had added the following:

This issue will act as a topic for all restructuring activities.

But will make it more explicit around further issues.


On Mac - Apple M1 Pro , failed to install plugin "hlf"

I am using MacBook Pro M1. And I am facing this problem.
`MacBook-Pro ~ % kubectl krew version
OPTION            VALUE
GitTag            v0.4.3
GitCommit         dbfefa58
IndexURI          https://github.com/kubernetes-sigs/krew-index.git
BasePath          /Users/papandas/.krew
IndexPath         /Users/papandas/.krew/index/default
InstallPath       /Users/papandas/.krew/store
BinPath           /Users/papandas/.krew/bin
DetectedPlatform  darwin/arm64
MacBook-Pro ~ % kubectl krew install hlf
Updated the local copy of plugin index.
Installing plugin: hlf
W0516 21:50:03.627779   14988 install.go:164] failed to install plugin "hlf": plugin "hlf" does not offer installation for this platform
failed to install some plugins: [hlf]: plugin "hlf" does not offer installation for this platform
MacBook-Pro ~ %`

Hello @jaljaivikbazaar
This will be implemented in v1.7.0.
As a workaround, you can clone the repository and build the plugin by yourself:
git clone https://github.com/hyperledger-labs/hlf-operator
cd kubectl-hlf
go build -o kubectl-hlf ./main.go && sudo mv kubectl-hlf /usr/local/bin/kubectl-hlf

Thank you very much for your help
But now I run into another problem
`
MacBook-Pro hlf-operator % go build -o kubectl-hlf ./main.go && sudo mv kubectl-hlf /usr/local/bin/kubectl-hlf
controllers/networkconfig/networkconfig_controller.go:12:2: no required module provides package github.com/kfsoftware/hlf-operator/kubectl-hlf/cmd/helpers; to add it:
go get github.com/kfsoftware/hlf-operator/kubectl-hlf/cmd/helpers
MacBook-Pro hlf-operator % go get github.com/kfsoftware/hlf-operator/kubectl-hlf/cmd/helpers
go: github.com/kfsoftware/hlf-operator/kubectl-hlf/cmd/helpers: no matching versions for query "upgrade"
MacBook-Pro hlf-operator %
`

WIth the new updates, version 1.7.x , I just had to manually build it. Then added the environment variable so that it go listed under kubectl plugin list
thats it, started working fine. Thank you very much for the help.


how to make the screen look pixelated?

Describe your problem here.
how do you make the whole screen look pixelate?
for exmaple like this (this screenshot is on yoshicrafter):

Are you modding a build from source or with Lua?
Lua
What is your build target?
Windows x64
Did you edit anything in this build? If so, mention or summarize your changes.
No i didnt change anything

runHaxeCode([[
FlxG.scaleMode.width = 640;
FlxG.scaleMode.height = 360;
]])


PHP RedHat deploy configs

This PR creates PHP deploy configs for Amazon Linux 2 (a RedHat derivative). It mirrors what was done for Debian by creating a Wordpress install for Apache, Apache + FPM, and nginx + FPM.

Thanks for putting these up!
Was able to deploy :)
Questions:

when I ran newrelic-install.sh, it showed slightly different behavior from the previous jsons.
With install, the debian jsons only ask for the license key.

In test/manual/definitions/apm/php-agent/php-nginx-fpm-wordpress-linux2.json, the install additionally asked for:
New Relic PHP Agent Installation (interactive mode)
===================================================

   Enter New Relic license key (or leave blank): 07a2ad66c637a29c3982469a3fe8d1982d002c4a

Below is a list of the directories in which we found a copy of PHP.
Please select the directory or directories for which you wish to install
New Relic. You can select either a single directory or
multiple directories by separating each choice with either a space or a
comma. To select all of the directories shown, please enter the special
keyword 'all' (without the quotes).

   1)   /bin
   2)   /usr/bin

   0)   Exit

   Selection (1-2, 0 to exit or all):

Probably a valid use case that we'll need to ensure we handle for chatty and silent installs.

For test/manual/definitions/apm/php-agent/php-nginx-fpm-wordpress-linux2.json, the website is running, but ps and top aren't showing the processes?

ps aux
  PID TTY      STAT   TIME COMMAND
 5034 pts/0    Ss     0:00 -bash
 5080 pts/0    R+     0:00 ps aux

@zsistla

On this image /bin is a symlink to /usr/bin. I am not sure why. I agree that we'll want to make sure to handle this case (as well as situations where there are really two versions of PHP installed). Thanks for calling it out!
If you run ps as root you'll see the nginx processes. Perhaps there's an SELinux config or other security setting on Linux 2 instances that controls whether non-root users can see the processes for all users? Either way, since the recipes are run via sudo, I don't think we need to do anything different than we already are. Let me know if I'm missing anything.

sudo ps aux|grep nginx
root      4481  0.0  0.2 125884  2236 ?        Ss   14:00   0:00 nginx: master process /usr/sbin/nginx
nginx     4482  0.0  0.4 126340  4004 ?        S    14:00   0:00 nginx: worker process
nginx     4483  0.0  0.4 126340  4004 ?        S    14:00   0:00 nginx: worker process
ec2-user  4554  0.0  0.0 119416   868 pts/0    S+   14:01   0:00 grep --color=auto nginx

That makes sense, thanks @joshuabenuck.


[Avatar] Migrate to emotion

I took a first stab at the Alert component for the emotion migration. One of #24405.
I have not yet figured out how to test and I would say generally a bit confused exactly how overridesResolver and useUtilityClasses works but I'll be figuring that out the next few days.  I'm opening this now 1) in case anyone wants to add some pointers 😅  and 2) so no one duplicates the work.

[x] I have followed (at least) the PR section of the contributing guide.

@mnajdova Probably it's [Alert] Migration to emotion

@mnajdova Probably it's [Alert] Migration to emotion

@mnajdova Probably it's [Alert] Migration to emotion

Right, thanks! The two PRs came approximately at the same time, so I must have confused them :)

@mnajdova Probably it's [Alert] Migration to emotion

Right, thanks! The two PRs came approximately at the same time, so I must have confused them :)


allow more flexible mutable arrays

This solves a problem when the iterate is of a mutable type, which was previously not correctly captured

Codecov Report

Merging #215 (0f77fc5) into master (51a4430) will decrease coverage by 0.08%.
The diff coverage is 87.50%.

@@            Coverage Diff             @@
##           master     #215      +/-   ##
==========================================
- Coverage   68.87%   68.79%   -0.09%
==========================================
  Files          14       13       -1
  Lines        1687     1679       -8
==========================================
- Hits         1162     1155       -7
+ Misses        525      524       -1

Impacted Files
Coverage Δ

src/afw.jl
74.09% <ø> (ø)

src/fw_algorithms.jl
77.10% <75.00%> (ø)

src/blended_cg.jl
50.93% <100.00%> (-0.39%)
:arrow_down:

src/norm_oracles.jl
96.05% <100.00%> (ø)

src/types.jl
64.83% <100.00%> (+0.70%)
:arrow_up:

src/utils.jl
53.37% <0.00%> (-0.28%)
:arrow_down:

src/oracles.jl
86.59% <0.00%> (-0.14%)
:arrow_down:

src/FrankWolfe.jl

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 51a4430...0f77fc5. Read the comment docs.


Redo all key management functions to use keymanager API

[x] keys list
[x] keys delete
[x] keys import
[x] keys recipient
[x] keys gas
[ ] All clients tested

[x] Lighthouse

[x] keys
[x] recipient
[x] gas

[x] Teku

[x] keys
[x] recipient
[x] gas

[ ] Prysm

[x] keys
[x] recipient
[ ] gas - get and set, delete in devel

[ ] Nimbus

[ ] keys - mostly works, cannot import Prysm's name
[x] recipient
[ ] gas - not implemented yet
[x] Nimbus bug workaround removed

[ ] Lodestar

[ ] keys - mostly works, cannot import large slashing protection json
[ ] recipient - implemented in next
[ ] gas - implemented in next
[x] Lodestar bug workaround removed

The Nimbus/Prysm issue is for Prysm to fix: https://github.com/prysmaticlabs/prysm/pull/11443

Nimbus gas feature request: https://github.com/status-im/nimbus-eth2/issues/3946

Lodestar return code: https://github.com/ChainSafe/lodestar/issues/4760

Nimbus gas implementation tested, closing


store/postgres: Index string attributes as btrees

We used to create indexes on string attributes as GIN indexes; with the way
we translate filters into SQL, these indexes do not get used. Since they
are only on individual attributes, there's no downside to using a standard
BTree index, which makes them usable for our filters.

This PR does not change existing indexes, only changes what indexes get created for new subgraphs.
In one example from production it brings the time for a query down from 6s to 200ms.


Added numpy<=1.21.2 constraint to environment.yml

The current taxcalc package's use of numba is not compatible with numpy 1.22.2. I tried a clean install tonight of the ogusa-dev conda environment using the current environment.yml file. After activating the new ogusa-dev conda environment and running pip install -e ., I tried to run the example script run_og_usa.py. This script immediately generated the following traceback error.
(ogusa-dev) richardevans@Rick-MacBook-Pro-2020 OG-USA % python ./examples/run_og_usa.py
Traceback (most recent call last):
  File "/Users/richardevans/Documents/Economics/OSE/OG-USA/./examples/run_og_usa.py", line 6, in <module>
    from taxcalc import Calculator
  File "/Users/richardevans/opt/anaconda3/envs/ogusa-dev/lib/python3.10/site-packages/taxcalc/__init__.py", line 4, in <module>
    from taxcalc.calculator import *
  File "/Users/richardevans/opt/anaconda3/envs/ogusa-dev/lib/python3.10/site-packages/taxcalc/calculator.py", line 14, in <module>
    from taxcalc.calcfunctions import (TaxInc, SchXYZTax, GainsTax, AGIsurtax,
  File "/Users/richardevans/opt/anaconda3/envs/ogusa-dev/lib/python3.10/site-packages/taxcalc/calcfunctions.py", line 24, in <module>
    from taxcalc.decorators import iterate_jit, JIT
  File "/Users/richardevans/opt/anaconda3/envs/ogusa-dev/lib/python3.10/site-packages/taxcalc/decorators.py", line 13, in <module>
    import numba
  File "/Users/richardevans/opt/anaconda3/envs/ogusa-dev/lib/python3.10/site-packages/numba/__init__.py", line 200, in <module>
    _ensure_critical_deps()
  File "/Users/richardevans/opt/anaconda3/envs/ogusa-dev/lib/python3.10/site-packages/numba/__init__.py", line 140, in _ensure_critical_deps
    raise ImportError("Numba needs NumPy 1.21 or less")
ImportError: Numba needs NumPy 1.21 or less

It looks like it is a problem with the numba package in taxcalc and the version of numpy. It says "ImportError: Numba needs NumPy 1.21 or less".
My temporary fix is to set numpy<=1.21.2 in environment.yml. Running the example script with this change allows the program to run. This is obviously a temporary fix until we figure out why numba can't talk to numpy > 1.21.2. But until then, I recommend this fix.
cc: @jdebacker

@jdebacker. In this March 4, 2022 issue thread on the numba.discourse.group, the numbamaintainers confirm that numpy 1.22 is not currently supported. The GitHub ticket for updating the support of numpy 1.22 in numba is here.
For now, I will put a marker on the environment.yml line that pins Numpy at numpy<=1.21.2 that this restriction can be removed as soon as numba supports numpy 1.22. This is ready for your review.

@jdebacker I actually wasn't sure whether you could put comments in the environment.yml file, so I tested it out and everything works great.


lxd/storage/dir: Don't apply quotas on snapshots

Signed-off-by: Stéphane Graber<EMAIL_ADDRESS>

Testsuite passed


Add podAnnotations to gateways in helm chart

This allows adding additional annotations on any of the gateways, e.g.
--set gateways.istio-ingressgateway.podAnnotations.fluentbit\.io/parser=envoy

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: sdake
If they are not already assigned, you can assign the PR to them by writing /assign @sdake in a comment when ready.
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

install/OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Hi @donbowman. Thanks for your PR.
I'm waiting for a istio member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

I signed it!

/ok-to-test

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: gyliu513
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

install/OWNERS [gyliu513]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@donbowman: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/istio-unit-tests.sh
93224800c10098bb05b89ef9e591cb2b17a5dafb
link
/test istio-unit-tests

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/test istio-unit-tests

@donbowman: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/istio-unit-tests.sh
93224800c10098bb05b89ef9e591cb2b17a5dafb
link
/test istio-unit-tests

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

/retest

@donbowman: The following test failed, say /retest to rerun them all:

Test name
Commit
Details
Rerun command

prow/istio-unit-tests.sh
93224800c10098bb05b89ef9e591cb2b17a5dafb
link
/test istio-unit-tests

Instructions for interacting with me using PR comments are available here.  If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

um, anyone have a suggestion on the failing test? I added a line to the helm annotation, these tests are not using helm i think, so i'm a bit at a loss.
https://github.com/istio/istio/blob/master/istioctl/cmd/istioctl/proxyconfig_test.go#L113
https://storage.googleapis.com/istio-prow/pull/istio_istio/8776/istio-unit-tests/13439/artifacts/junit_unit-tests.xml


ClientRuntime: Don't serialize protected members.

(abusing CI since my machine is no longer capable of opening that project in VS, msbuild also can't find some targets... guess the move to VS2017 messed that up)

Reproed the problem, RawJsonIsSerialized failed in http://azuresdkci.cloudapp.net/job/sdk-for-net/4657/console.
Pushing the fix.

Waiting for end-to-end test to verify


Has Many through

After extensive research I am still experiencing problems with as has many through join. It appears to me that the third argument to through is never being used.
My model is defined as such
  const User = db.Model.extend({
    tableName: 'users',
    responses() {
      return this.hasMany('Response', 'userId');
    },
    userLanguages() {
      return this.hasMany('UserLanguage', 'userId');
    },
    languages() {
      return this
        .hasMany('Language', 'id')
        .through('UserLanguage', 'id', 'never_being_used');
    }
  });

  const UserLanguage = db.Model.extend({
    tableName: 'userLanguages',
    language() {
      return this.belongsTo('Language', 'languageId');
    },
    languages() {
      return this.belongsTo('Language', 'languageId');
    },
    user() {
      return this.belongsTo('User', 'userId');
    }
  });

  const Language = db.Model.extend({
    tableName: 'languages',
    users() {
      return this.hasMany('User')
      .through('UserLanguage');
    },
    userLanguages() {
      return this.hasMany('UserLanguage', 'id');
    }
  });

User.fetch({ withRelated: ['languages' ] }) returns an empty array even though User.fetch({withRelated: ['userLanguages.language'] }) works perfectly fine

@RobAWilkinson try to replace hasMany->through with belongsToMany

@absolux could you clarify your comment with an example? Not sure how replacing hasMany->through with belongsToMany for example here:
languages() {
      return this
        .hasMany('Language', 'id')
        .through('UserLanguage', 'id', 'never_being_used');
    }

would allow me to get this relation: User.related('languages')?

@dwoowb
languages () {
  return this.belongsToMany('Language', 'userLanguages', 'userId', 'languageId')
}

Visit the docs for more info

How would one create Language relation model having User model instance in this case?
This
user.languages().create({ languageId: 1 })

fails while trying to insert languageId attribute into languages table, while instead the expected behavior would be inserting into userLanguages of course


Fix scaling on macOS

This fixes scaling on macOS by taking into account the global scale parameter when accessing raw font size.

#682 is not sufficient due to custom text rendering in ngscopeclient. Waiting for testing by @VIPQualityPost.


Fixing Google Analytics implementation

Wrapping Google Analytics properties in quotes to be string literals
Passing along the correct config property for Google Analytics domain
Defaulting Google Analytics Domain to be 'auto'
Allowing Google Analytics in stage and production
Fixes #49

This has been deployed to stage and successfully manually tested (by viewing that the Google Analytics initialization code is in the produced HTML and includes the correct string literals). All automated tests have also passed.

This has been deployed to production.


How to get the error column or row when exception

Dear fellow,  I love ClearScript. I had used MSScriptControl.ocx for running vbscript code , which can get the error column or row when errored. Does ClearScript support getting the error column or row?

Hi @irix2008,
An exception thrown during script execution usually contains a script stack trace in IScriptEngineException.ErrorDetails:
try
{
    engine.Execute(someCode);
}
catch (Exception exception)
{
    var scriptException = exception as IScriptEngineException;
    if (scriptException != null)
    {
        Console.WriteLine(scriptException.ErrorDetails);
    }
}

Note that Windows script engines only provide stack traces when debugging features are enabled, so be sure to pass WindowsScriptEngineFlags.EnableDebugging to the VBScriptEngine constructor.
Good luck!

Great, very thanks. Now I can get the error row or column,although it looks like "at (Script Document [temp]:0:8) ->"


Pade keeps re-setting my online status message to "hello"

Even when I have explicitly set "I'm online" in the "Active Status" field, when I return from idle (away) to online status it changes to "hello". It does not happen on first launch of the Pade window. Only after going away and then returning back the status auto-changes...

It because you have auto-presence set on with a different default status message. I suggest you switch auto-presence off by dragging the slider to ZERO

But it keeps setting "hello" even if I do not have filled anything in there in the "Active Message" field.

Ok. I get it now. If you have not filled in another message here, you want it to use the message you set in converse when it goes back to state "online" from "away".

Done. Now available in version 1.1.5


[Upgrading] Modification in the logo of the website

Problem
Previously the user might click on the logo while clicking on the white space present in front of the logo as the display is set to inline for the anchor tag and the image of logo seems to be cut from the bottom as it is not presented properly.

Description

The user might face difficulties while navigating the website, plus the logo seems to be not displayed properly.
Look of website after applying this solution:

Implementation

[x] I would be interested in implementing this feature.

I would really love to contribute to this issue please trigger this issue so that I would start working on it.

I think this is a duplicate of #70


fix(dev): disable hoisted for dev

close #514
Bug Reason
Because hoisted vnode only have one copy, the el will caused conflict with multi used.But it is a design, the static vnode will not update forever on production.So we need diasbled hoisted in dev.

See https://github.com/vuejs/vue-next/commit/5f61aa0f719cbd90182af1e27fad37b91c2c351e
I think it's better to use the same compiler options for dev/prod to ensure behavior consistency.


Versions >0.4.0 lose playlist controls

After updating from v0.4.0 to v0.4.1 or v0.4.2, I lose the ability to make/modify/remove playlists which I previously had access to.
Rolling back to v0.4.0 restores this functionality.
The docker log has no entries on any of these failures.
Is there more info I can provide?  Can anyone else confirm if they're having this issue?

Related to #15, run chown -R 10000:10001 ./config to allow the container to write to the config directory.


Add doc

Codecov Report

Merging #31 (e78e3ec) into main (41d7db9) will increase coverage by 0.52%.
Report is 16 commits behind head on main.
The diff coverage is 91.74%.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
@@             Coverage Diff              @@
##               main      #31      +/-   ##
============================================
+ Coverage     75.34%   75.87%   +0.52%
  Complexity       76       76
============================================
  Files            13       13
  Lines          1436     1513      +77
  Branches         96       97       +1
============================================
+ Hits           1082     1148      +66
- Misses          299      310      +11
  Partials         55       55

Files
Coverage Δ

...ain/java/prometheus/exporter/jgc/tool/Metrics.java
100.00% <100.00%> (ø)

...c/main/java/prometheus/exporter/jgc/Bootstrap.java
0.00% <0.00%> (ø)

...etheus/exporter/jgc/parser/ContinousGCLogFile.java
0.00% <0.00%> (ø)

...rometheus/exporter/jgc/parser/GCEventRecorder.java
63.61% <73.41%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


chore(ci): Replace targets input with windows boolean

Follow up from https://github.com/vercel/turbo/pull/6182#discussion_r1361050654
Closes TURBO-1495

Examples tests failed here, but it's unrelated. Fixing in #6225.


Set boolean flag for using local storage for generated notes

We should default to not storing notes in local storage, but simultaneously provide the user with the ability to do so when they are prompted with our modal, describing the note and its purpose. This can be toggled ideally from the front-end eventually.

Closing this in favor of adding to the TS API.

Closing this in favor of adding to the TS API.


ValueError: datestring must be valid date string and not None when querying list of images of EC2

Summary
It seems to be an error querying a datestring from extra data of the images of EC2
Detailed Information
I'm newbie at using libcloud, i've already ran a file to list the images of GCP Compute Engine - not problem. Then, i tried to do the same but using AWS EC2, and i'm pretty sure that there are not problems with ACCESS_ID an SECRET_KEY, since i tried to modify these in order to damage the keys and then it appears an error with AWS AuthFailure, but when i use the correct ones, there's no problem around there. But when trying to print the list of images, i got the error ValueError: datestring must be valid date string and not None.
This includes information about your environment (which Libcloud version are
you using, which Python version, which Operating System / distribution, etc.)
and steps which are needed to reproduce it.
I'm currently using Apache Libcloud 3.6.0, Python 3.10 and Ubuntu 22.04
If you need to check out my code, you can check this repo: https://github.com/juanmarcosdev/avances-libcloud/
The file driver_gcp.py works pretty well. The one with the error is driver_aws.py
I'm using a .env file in order to keep secret my AWS credentials.
Thanks!

I tried to replicate the issue with EC2 driver, but I couldn't - it works fine for me.
It appears that the issue is related to the response - one of the images returned doesn't seem to contain one of the extra attributes or similar.
Are you sure you are using valid key with the correct permissions for EC2? In addition to that, are you behind a proxy?
Please run your script with LIBCLOUD_DEBUG environment variable set and gist the output (https://libcloud.readthedocs.io/en/stable/troubleshooting.html#debugging - make sure you remove any secrets from the output):
LIBCLOUD_DEBUG=libcloud.log python3 driver_aws.py

Having said that^, I still think Libcloud should handle this scenario better (image doesn't contain creation date or some other date related attribute) so I will look into making a code change to handle that better.

I believe this PR should fix this issue for you - https://github.com/apache/libcloud/pull/1701.


fix: Sortable uppercase compatibility fix

src/index.js now exports lower- and uppercase sortable. This fix should be removed with release 2.0.0

added tests
bumped version to 1.2.1

referenced to #49
closes #57
see http://semver.org/

bump?


fix: Api creds redesign

Type of Change

[x] Bugfix
[ ] New feature
[x] Enhancement
[ ] Refactoring
[ ] Dependency updates
[ ] Documentation
[ ] CI/CD

Description
Redesigned API Credentials UI
Motivation and Context
UI Enhancement
How did you test it?

Before

After

Where to test it?

[x] INTEG
[x] SANDBOX
[ ] PROD

Checklist

[x] I ran npm run re:build
[x] I reviewed submitted code
[ ] I added unit tests for my changes where possible

https://github.com/user-attachments/assets/a7b883a5-dbee-4642-b207-5c441caa3e40
with the input boxes, it seems like the fields can edited there itself, still the fields are getting updated from sidebar , its bit of contradictory i think

Screen.Recording.2024-12-31.at.6.50.01.PM.mov
with the input boxes, it seems like the fields can edited there itself, still the fields are getting updated from sidebar , its bit of contradictory i think

It is as per the design


 has issues with chevron direction

Description of the issue

When I expand a disclosure element (This is a pfe-accordion with only one header-panel pairing) and hover over the button, I see the text and chevron shift to the left.
On the regular accordion, the chevron points the wrong directions, see design specs
On the disclosure version of the accordion, the chevron points the wrong directions see design specs

Impacted component(s)

pfe-accordion

Steps to reproduce item 1

Go to the pfe-accordion demo page: http://localhost:8000/elements/pfe-accordion/demo/
Scroll to the Disclosure
Expand the disclosure
Hover over the header (button)

Steps to reproduce item 2

Go to the pfe-accordion demo page: http://localhost:8000/elements/pfe-accordion/demo/
Notice that the chevron points down and it should point to the right when closed
Expand the accordion
Notice that the chevron points up, and it should point down when open

Steps to reproduce item 3

Go to the pfe-accordion demo page: http://localhost:8000/elements/pfe-accordion/demo/
Scroll to the Disclosure
Notice that the chevron points down and it should point to the right when closed
Expand the disclosure
Notice that the chevron points to the right, and it should point down when open

Expected behavior

The text and chevron should remain fixed on hover.
The thicker border should be on the left and should be an accent color on pfe-nav (accordion)

Screenshots

prod: redhat.com/search/linux

https://rally1.rallydev.com/#/detail/defect/aaca0dbc-bf59-41a8-a0ad-12089bafb9cd?fdp=true

I think the mobile nav (which uses accordion)  is also impacted.
Prod:

current state of master branch:

Resolved:

When I expand a disclosure element (This is a pfe-accordion with only one header-panel pairing) and hover over the button, I see the text and chevron shift to the left.
On the disclosure version of the accordion, the chevron points the wrong directions

Still needs to be addressed:

On the regular accordion, the chevron points the wrong directions

closing in favor of one issue to address all chevron concerns: https://github.com/patternfly/patternfly-elements/issues/1512


Flink Integration

Current coverage is 70.13% (diff: 0.00%)

Merging #43 into master will decrease coverage by 0.07%

@@             master        #43   diff @@
==========================================
  Files            14         15     +1
  Lines          1400       1403     +3
  Methods        1396       1399     +3
  Messages          0          0
  Branches          3          4     +1
==========================================
+ Hits            983        984     +1
- Misses          417        419     +2
  Partials          0          0

Powered by Codecov. Last update ef126be...62aa481

LGTG!


ci: Upload code coverage to Codecov

Because of the way the tests were written, coverage is not collected.


Unit test for RmZeroSizedResponseTest

This function tests an interesting case. It's worthy of a unit test. My quick reading of this is that it's testing a situation where a call to the receive function in a TCTI returns 0 bytes. This is a weird edge case and probably something we should test for in every TCTI we create.

This would be testing resourcemgr code which is only a few weeks away from being deleted. No need to keep this around.


Adding new worker node to an existing cluster

This issue is to discuss the design for new worker node addition to an existing cluster

@Kuldip-Nanda is working on it - https://github.com/ocp-power-automation/ocp4-upi-powervs/pull/142

This is completed.


Make top charts component, very similar to top artists and groovy component, copy/paste

I want to work on this please assign this issue to me.

I want to work on this please assign this issue to me.

Go ahead ..a

I want to ask what content I can add to the top charts component. Please give some description.

I want to ask what content I can add to the top charts component. Please give some description.

use the same data as in the UI

@Aman-Mandal okay

done


[MB-3718] Generate reference ID for payment service items

Description
This PR adds an automatically-generated reference ID for new payment service items (PSI).  In addition, this reference ID is used in the N9 segment of the EDI, and is also returned as part of the JSON payload for payment service items.
As detailed in the JIRA story, the format of the reference ID is: <MTO Reference ID>-<enough of PSI ID to make it unique>.  A minimum of 8 characters of the PSI ID are used.  More are added if necessary to make it unique, up to a maximum of 30 characters for the overall reference ID (a limit mandated by the max allowed size in the EDI).
Reviewer Notes

The story talks about creating a reference ID upon the approval of the payment service item, but after some discussion, we decided to just do it at creation.  This has the advantage of allowing us to make the field non-nullable.
I use Pop's BeforeCreate callback to create a UUID (needed to compose the reference ID) and generate the reference ID itself.
Note that the migration gets rid of all the existing payment requests (and related records) in staging/experimental (there should not be any in production yet).  We do this to avoid writing a complex SQL migration to "fix" any payment service items in deployed environments.

Setup

make db_dev_e2e_populate
Use your favorite DB client and look at the payment_service_items table.  You should see that the new reference_id column is populated with an appropriate reference ID based on the format above.
make server_run
Save the following payload in create_payment_request.json:{
  "body": {
    "isFinal": false,
    "moveTaskOrderID": "9c7b255c-2981-4bf8-839f-61c7458e2b4d",
    "serviceItems": [
      {
        "id": "722a6f4e-b438-4655-88c7-51609056550d"
      },
      {
        "id": "ca9aeb58-e5a9-44b0-abe8-81d233dbdebf"
      },
      {
        "id": "6431e3e2-4ee4-41b5-b226-393f9133eb6c"
      },
      {
        "id": "fd6741a5-a92c-44d5-8303-1d7f5e60afbf"
      }
    ]
  }
}

Create the payment request using the file above:go run ./cmd/prime-api-client --insecure create-payment-request --filename create_payment_request.json | jq

The returned payload should have a referenceID for any payment service items.
Save the following payload to get_payment_request_edi.json, replacing <paymentRequestID> with the payment request ID that was output from the previous step:{
  "paymentRequestID": "<paymentRequestID>"
}

Get the EDI for that payment request:go run ./cmd/prime-api-client --insecure support-get-payment-request-edi --filename get_payment_request_edi.json | jq -r '.edi'

You can use this same prime-api-client (with appropriate flags) to view the EDI in our deployed environments.
Verify that you see the reference ID in the returned EDI in the N9 segments.  There should be four of them, one for each service item.

If desired, you can look at other prime-api-client commands like fetch-mto-updates that return payment service items if they exist and verify referenceID appears for them as well.  There are also GHC endpoints that return payment service items that you could view through the browser inspector in the TIO interface.
Code Review Verification Steps

[ ] Code follows the guidelines for Logging
[ ] The requirements listed in Querying the Database Safely have been satisfied.
Any new migrations/schema changes:

[ ] Follow our guidelines for zero-downtime deploys (see Zero-Downtime Deploys)
[ ] Have been communicated to #g-database
[ ] Secure migrations have been tested following the instructions in our docs

[ ] Request review from a member of a different team.
[ ] Have the Jira acceptance criteria been met for this change?

References

Jira story for this change

Messages

:book:
:link: MB-3718

  Generated by :no_entry_sign: dangerJS against f6732cb0ddc449ef0d8f4090be13621f1bf070e1


Update snowflake-example.md

Description

Related Issues

Checklist

[ ] Is this code covered by new or existing unit tests or integration tests?
[ ] Did you run make unit-testing and make integration-testing successfully?
[ ] Do new classes, functions, methods and parameters all have docstrings?
[ ] Were existing docstrings updated, if necessary?
[ ] Was external documentation updated, if necessary?

Additional Notes or Comments

This conversion should not be the responsibility of users.
It must be done within the framework's code.
# We set this value, since Snowflake via `ibis` doesn't support `bytes` directly.
os.environ['SUPERDUPERDB_BYTES_ENCODING'] = 'Str'


fix: refresh architecture and philosophy docs for clarity purposes

Description of the change:
Small refresh for the architecture and philosophy docs. The main motivation was to be more deliberate about certain wording to lower the confusion a new developer has when approaching the OLM repo for the first time.
Motivation for the change:
General improvements to OLM repository
Reviewer Checklist

[ ] Implementation matches the proposed design, or proposal is updated to match implementation
[ ] Sufficient unit test coverage
[ ] Sufficient end-to-end test coverage
[ ] Docs updated or added to /docs
[ ] Commit messages sensible and descriptive

/test e2e-aws-olm


No instructions how to turn on performance overlay

Readme mentions a handy feature of performance overlay. However the link just points to the gif and there're no instructions how to actually turn it on.

https://github.com/hecrj/iced/blob/master/Cargo.toml#L36

It's in the documentation:
https://github.com/hecrj/iced/blob/6b4bf34bf94eed091eb89efa1bbb14e6bc68883e/src/application.rs#L20-L21


Issue Annotating Raw KEGG Map

Hi @noriakis,
I'm trying to highlight specific gene nodes on raw KEGG maps using ggkegg but for some reason it isn't working for me. Is it possible to achieve this using this package? This is the code that I tried to use:
reaction <- c("rn:R00756")
g <- pathway("dosa00010") |> mutate(mod=highlight_set_nodes(reaction, how="all"))
ggraph(g, layout="manual", x=x, y=y)+
geom_node_rect(fill="grey",aes(filter=type == "ortholog"))+
overlay_raw_map("dosa00010")+
geom_node_point(aes(filter=type == "reaction"),
shape=21, fill="blue", color="black", size=2)+
ggfx::with_outer_glow(
geom_node_point(aes(filter=mod, x=x, y=y), color="red",size=2),
colour="yellow",expand=5
)+
theme_void()
And this is the resulting plot:

I didn't receive any error messages or anything, but the gene node that I wanted to highlight was not highlighted. If you could provide some insight that would be great. Thank you!

Hi, highlight_set_nodes searches for the the name column in node data by default as described in the manual. You should change name argument to reaction if you search for the reaction column, like:
highlight_set_nodes(highlight_reaction, name="reaction", how="all")

In highlight_set_nodes of the dev branch, the message will be shown when there are no nodes highlighted (or all nodes are highlighted). Feel free to reopen the issue if you encounter the other issue.


Fixing the documentation

Fixed the example shown in the documentation for storage API
Fixes #6097

@googlebot  I signed it!

Sure, I will raise a new pull request.