I connected many different WIFI cameras to HA (Wyze, Eufy, tplink…) and all of them have no audio in HA but in other players like VLC there is audio.
I have been investigating this for few days already. It seems that the problem starts with the fact the WebRTC doesn’t support AAC codec and probably all my cameras have AAC audio.
So, I added go2rtc with this config:
streams:
camera.living_room_cam:
- rtsp://username:[email protected]/live0
- ffmpeg:rtsp://localhost:8554/camera.living_room_cam?audio=copy#audio=pcma
And it actually solved the problem. I am able to get video and audio in HA with the WebRTC UI card. The problem is that it’s not really an entity in HA, I can’t use events like recording, snapshot, automation, ONVIF features of the camera… Or at least I don’t know how to do that
So, I tried to connect these cameras using Generic Camera and / or ONVIF integrations as these cameras supports it. The problem that these integrations in HA don’t use go2rtc, rather they use RTSP2Web / RTSP2WebRTC and they don’t use ffmpeg so I don’t get audio
Generic camera integration even have some extra parameters to send to ffmpeg which I don’t really understand how it works if it goes through RTSP2Web which is not ffmpeg, regardless, I passed these parameters to ffmpeg in generic camera:
-acodec pcm_s16le -vcodec copy
But it has 0 affect.
According to documentation HA has builtin ffmpeg but I don’t know how to use it correctly I guess.
So right now I am stuck between having a video and audio using go2rtc and give up on all the goodies of ONVIF features and camera entity in HA or get all the features without audio
Any help would be great