go2rtc icon indicating copy to clipboard operation
go2rtc copied to clipboard

Fixing Home Assistant-homekit camera choppy audio

Open TiddlyWiddly opened this issue 5 months ago • 3 comments

Hi - I'm trying to fix choppy audio with the homekit implementation in Home Assistant due to timestamps (https://github.com/home-assistant/core/pull/149548). The HA/homekit maintainer thinks maybe this is possible to fix with go2rtc, but I'm not sure this is possible while still retaining the ability to pair arbitrary HA sensors with the video feed. Is there some other idea that may work here with go2rtc to avoid the lift of bringing in gstreamer into Home Assistant platform?

TiddlyWiddly avatar Jul 28 '25 15:07 TiddlyWiddly

You don't needs gstreamer there. You can use ffmpeg like HomeBridge or Scrypted do this. Or you can try to do this with python.

The problem and fix are described in detail here: https://github.com/AlexxIT/go2rtc/blob/master/pkg/opus/homekit.go

AlexxIT avatar Aug 09 '25 16:08 AlexxIT

@AlexxIT those are separate projects. I want to use the home assistant integration for HomeKit which is the PR I linked you to first. I modeled my gstreamer addition after the logic in your opus.go

As far as ffmpeg you say here that it can’t be done with ffmpeg alone: https://github.com/AlexxIT/go2rtc/issues/1401#issuecomment-2416840264

TiddlyWiddly avatar Aug 09 '25 17:08 TiddlyWiddly

Ok. Now I get it.

Yes, you can't use FFmpeg out of box and should do some additional logic with its output.

I agree with HA maintainer, that using gstreamer just for this task it's overcome.

I'll think about it. Maybe I can add something similar directly to go2rtc. Because go2rtc already inside HA container.

AlexxIT avatar Aug 09 '25 18:08 AlexxIT