[Config Support]: WebRTC no audio in frigate or go2rtc #14322
-
Describe the problem you are havingAudio on WebRTC streams is not coming through, while MSE works fine. Two-way audio is also not working in Frigate or the embedded go2rtc. I tried installing a standalone go2rtc (v1.9.4) on the same host with configuration copied from frigate's /dev/shm/go2rtc.yaml and it works as expected (incl. two-way audio). The camera is configured to send AAC audio and h264 video, and I can see this being the case if I probe the source in go2rtc. Camera in question is Amcrest IP4M-1041B. Similar issue was reported in #6737 - However for me the OP's suggestion of adding the "listen" parameter did not change anything in the behavior. Supplying the candidate list was another hint I picked up - but I don't think I need STUN in the first place because my clients all ingress from local sources without NAT. Whether I supply the candidate list or not, it doesn't seem to change anything. #9546 reports similar behavior, but again I already have the suggested solution implemented. Any suggestions would be welcome, especially if I'm missing something in your documentation. I feel I've gone through it a few times. Thanks! Version0.14.1-f4f3cfa Frigate config fileversion: 0.14
#auth:
#reset_admin_password: True
tls:
enabled: False
mqtt:
enabled: False
logger:
default: info
ffmpeg:
hwaccel_args: preset-vaapi
output_args:
record: preset-record-generic-audio-aac
cameras:
doghouse1:
enabled: true
ffmpeg:
inputs:
- path: rtsp://127.0.0.1:8554/doghouse1-detect
roles:
- detect
- path: rtsp://127.0.0.1:8554/doghouse1-record
roles:
- audio
- record
input_args: preset-rtsp-restream
detect:
enabled: false
live:
stream_name: doghouse1-record
go2rtc:
webrtc:
listen: 10.71.76.43:8555
candidates:
- 10.71.76.43:8555
streams:
doghouse1-detect:
- rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=1
- "ffmpeg:doghouse1-detect#audio"
doghouse1-record:
- rtsp://admin:[email protected]:554/cam/realmonitor?channel=1&subtype=0
- "ffmpeg:doghouse1-record#audio" Relevant Frigate log output2024-10-13 16:48:33.467812611 [INFO] Preparing Frigate...
2024-10-13 16:48:33.475154005 [INFO] Starting Frigate...
2024-10-13 16:48:34.450781433 [2024-10-13 16:48:34] frigate.app INFO : Starting Frigate (0.14.1-f4f3cfa)
2024-10-13 16:48:34.450996564 [2024-10-13 16:48:34] frigate.app INFO : Creating directory: /tmp/cache
2024-10-13 16:48:34.450998938 [2024-10-13 16:48:34] frigate.util.config INFO : Checking if frigate config needs migration...
2024-10-13 16:48:34.464798476 [2024-10-13 16:48:34] frigate.util.config INFO : frigate config does not need migration...
2024-10-13 16:48:36.615835868 [2024-10-13 16:48:36] peewee_migrate.logs INFO : Starting migrations
2024-10-13 16:48:36.624765228 [2024-10-13 16:48:36] peewee_migrate.logs INFO : There is nothing to migrate
2024-10-13 16:48:36.624769052 [2024-10-13 16:48:36] frigate.app INFO : Recording process started: 340
2024-10-13 16:48:36.624770289 [2024-10-13 16:48:36] frigate.app INFO : Recording process started: 342
2024-10-13 16:48:36.626901251 [2024-10-13 16:48:36] frigate.app INFO : go2rtc process pid: 90
2024-10-13 16:48:36.639567367 [2024-10-13 16:48:36] detector.cpu INFO : Starting detection process: 368
2024-10-13 16:48:36.641026674 [2024-10-13 16:48:36] frigate.app INFO : Output process started: 370
2024-10-13 16:48:36.643340169 [2024-10-13 16:48:36] frigate.detectors WARNING : CPU detectors are not recommended and should only be used for testing or for trial purposes.
2024-10-13 16:48:36.655334931 [2024-10-13 16:48:36] frigate.app INFO : Camera processor started for doghouse1: 384
2024-10-13 16:48:36.655339146 [2024-10-13 16:48:36] frigate.app INFO : Capture process started for doghouse1: 385 Relevant go2rtc log output2024-10-13 16:48:33.468643258 [INFO] Preparing new go2rtc config...
2024-10-13 16:48:33.662194440 [INFO] Not injecting WebRTC candidates into go2rtc config as it has been set manually
2024-10-13 16:48:33.686783267 [WARN] Using go2rtc binary from '/config/go2rtc' instead of the embedded one
2024-10-13 16:48:33.686787102 [INFO] Starting go2rtc...
2024-10-13 16:48:33.753167807 16:48:33.753 INF go2rtc platform=linux/amd64 revision=a4885c2 version=1.9.4
2024-10-13 16:48:33.753184712 16:48:33.753 INF config path=/dev/shm/go2rtc.yaml
2024-10-13 16:48:33.753821979 16:48:33.753 INF [rtsp] listen addr=:8554
2024-10-13 16:48:33.754166323 16:48:33.754 INF [webrtc] listen addr=10.71.76.43:8555
2024-10-13 16:48:33.754892346 16:48:33.754 INF [api] listen addr=:1984
2024-10-13 16:48:43.468560885 [INFO] Starting go2rtc healthcheck service... Frigate statsNo response Operating systemOther Linux Install methodDocker Compose docker-compose file or Docker CLI command#Quadlet in my case:
[Container]
ContainerName=frigate
Image=ghcr.io/blakeblackshear/frigate:0.14.1
AddDevice=/dev/dri:/dev/dri:rwm
GroupAdd=keep-groups
Volume=/opt/frigate/config:/config
Volume=/opt/frigate/storage:/media/frigate
Volume=/opt/frigate/custom.png:/media/custom.png
Network=host
Environment=FRIGATE_CAM_USER=yxz
Environment=FRIGATE_CAM_PASS1=xyz
Environment=FRIGATE_CAM_PASS2=zyx
ShmSize=512m
AddCapability=PERFMON
PodmanArgs=--privileged
[Service]
Restart=always
#[Install]
#WantedBy=default.target Object DetectorCPU (no coral) Screenshots of the Frigate UI's System metrics pagesNo response Any other information that may be helpfulNo response |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Your config is incomplete, you have not defined the audio codec to transcode to. You need to adjust it to be |
Beta Was this translation helpful? Give feedback.
Your config is incomplete, you have not defined the audio codec to transcode to. You need to adjust it to be
#audio=opus