Homekit camera audio very choppy

Hi there,

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?

3 Likes

anyone? any ideas? :slight_smile:

Same issue, were you able to figure this out?

unfortunately not :frowning:

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.

1 Like

Sorry for reopen this, but…
Any soloution yet?
Same Problem here. With Homebridge it worked fine…

fdk-aac is non-free, ffmpeg compiled with it results being not redistributable which is why its not supported.

https://trac.ffmpeg.org/wiki/Encode/AAC
https://wiki.libav.org/Encoding/aac

Anyone had luck on this? Still experiencing it in '22.

FDK AAC still isn’t free. This isn’t likely to get solved since it needs a patent license.

You might be better off with homebridge if you need camera audio as they produce non-free binaries and don’t seem to care about the patents GitHub - homebridge/ffmpeg-for-homebridge: Static ffmpeg binaries for Homebridge with support for audio (libfdk-aac) and hardware decoding (h264_omx). if you aren’t concerned about the legal risk. IANAL, be sure to seek legal advice, etc.

1 Like

Did it ever get confirmed the libfdk codec would solve the issue ?

It’s not choppy with the fdk aac codec (just not free)