Not sure if this is useful feedback but thought I’d share in case it points to a deeper issue. As I’ve mentioned, I have 3 Foscams ( two R2Cs and one R4), and a Nest Cam (via a Nest Hub max). Beta 6 fixed my Nest Cam audio issue by adding audio transcoding to the go2rtc.yaml:
"camera.nest_cam": ffmpeg:{input}#video=copy#audio=opus"
I thought the Foscams were working well without any additional settings, but in reality only the R4 has constant motion, so that’s the only one I was sure looked good. I later realized when I tested the R2Cs with motion, that their video actually looked quite choppy, when displayed using a picture-elements card, the info tab of the entity, but also via the addon WebUI. I then added similar transcoding settings for the Foscams as the one above for my Nest cam, and that finally fixed the video. Here is the info for one of the R2Cs when it’s working (top) and when it’s not (bottom). The main difference I see is without the transcoding settings, the audio codec is PCMU instead of OPUS (obviously), and the RTSP stream is listed as client producer, rather then server producer. Maybe one way taxes the cameras more than the other? The R2Cs are older than the R4, so maybe that’s why the R4 works well regardless of the transcoding settings.
Thought I’d share in case it helps improve something. Again, all 4 cameras work well by defining all 4 streams in the go2rtc.yaml using similar settings as for the Nest cam above, with lag-free video and audio.
[
{
"media:0": "video, sendonly, 96 H264/90000",
"media:1": "audio, sendonly, 97 OPUS/48000/2",
"receive": 3249353,
"remote_addr": "[::1]:52732",
"send": 0,
"track:0": "97 OPUS/48000/2, sinks=1",
"type": "RTSP server producer",
"url": "rtsp://localhost:8554/7dbc29519ce96b1d0468ab61323562e9",
"user_agent": "Lavf59.16.100"
},
{
"remote_addr": "udp4 host 192.168.0.210:54225",
"send": 423092,
"type": "WebRTC server consumer",
"user_agent": "Mozilla/5.0 (Linux; Android 13; Pixel 6 Build/TP1A.220905.004; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/105.0.5195.136 Mobile Safari/537.36 Home Assistant/2022.9.1-2700 (Android 13; Pixel 6)"
}
]
[
{
"media:0": "video, sendonly, 96 H264/90000",
"media:1": "audio, sendonly, 0 PCMU/8000",
"receive": 667299,
"remote_addr": "192.168.0.191:39761",
"send": 0,
"track:0": "0 PCMU/8000, sinks=1",
"type": "RTSP client producer",
"url": "rtsp://192.168.0.191:65534/videoMain/"
},
{
"remote_addr": "udp4 host 192.168.0.210:39873",
"send": 369381,
"type": "WebRTC server consumer",
"user_agent": "Mozilla/5.0 (Linux; Android 13; Pixel 6 Build/TP1A.220905.004; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/105.0.5195.136 Mobile Safari/537.36 Home Assistant/2022.9.1-2700 (Android 13; Pixel 6)"
}
]