I want to use my cameras alredy integrated in HA via Homekit, too. Everything is working in the Apple Home.App, only the sound is very chopped off.
When using the same camera in Homebridge via Homebridge Camera FFmpeg Plugin and without Home Assistant, the sound is working great, too.
That why I tried different HA integrations for my cameras (Generic, ONVIF, FFMPEG, Synology), but with every integration its the same problem: The sound is choppy in Home.App.
Any idea why this is the case? Is there any difference when using HA with Homekit compared to Homebridge with cam plugin?
I have been fighting this issue for almost a year now. I even switched my camera’s out thinking a different camera would work better but no change at all with the audio.
Video and audio are perfect in the Home Assistant browser and app. It’s just an issue with the HomeKit integration.
I’ve been experiencing this issue myself. Running 8x UVC G3’s and 2x UVC G3 Flex connected to HA through the “generic” camera platform.
I thought the audio choppiness may have been caused by the CPU in my RPi4 struggling to re-encode the audio on the fly, so I spun up a clean Hass.io VM (2x/8x cores from a Xeon cpu + 2gb ram) and published a single camera through it. I then stepped it up to 4x cpu cores and 4gb ram, the same choppy audio resulted in both instances.
I can confirm it has nothing to do with available system resources. If anyone else was thinking along the same lines, hopefully this saves you some time.
I haven’t tried specifying different codecs under the “entity_config:” section of “homekit:” in configuration.yaml yet. I don’t know what audio codecs HomeKit is set up to accept, plus I’m very green when it comes to ffmpeg so I wouldn’t really know what I was doing.
EDIT: Found an obscure mention from 2016 that using the libfdk codec produces clear, smooth audio in HomeKit. Unfortunately the only valid options for audio_codec in HA are copy or libopus.