Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTSP/ Home Assistant Homekit - no audio #1401

Open
haitham506 opened this issue Oct 16, 2024 · 3 comments
Open

RTSP/ Home Assistant Homekit - no audio #1401

haitham506 opened this issue Oct 16, 2024 · 3 comments
Labels
question Further information is requested

Comments

@haitham506
Copy link

haitham506 commented Oct 16, 2024

Hello,

go2rtc config:

streams:
  Entrancego2rtc: ffmpeg:rtsp://user:[email protected]/Preview_04_sub#video=copy#audio=opus

Home Assistant Homekit config:

homekit:
- name: Entrance Cam
  port: 21088
  mode: accessory
  filter:
    include_entities:
      - camera.entrance_sub
  entity_config:
    camera.entrance_sub:
      stream_source: rtsp://192.168.3.3:8554/Entrancego2rtc
      support_audio: True
      video_codec: copy
      audio_codec: copy
      linked_motion_sensor: binary_sensor.binary_sensor_entrance_person

Playing the camera on the browser or VLC works fine with audio.
When playing the camera in Home app (AppleTV/iPad) there is no sound even though it is OPUS

But if I add the camera to Homekit through go2rtc directly the audio works fine

I want it this way to link the motion sensor to the camera for push notifications with thumbnail + if I add it to homekit through HA without go2rtc the audio will be Choppy because of the transcoding aac to opus

What is the issue here?

Thank you :)

@AlexxIT AlexxIT added the question Further information is requested label Oct 16, 2024
@AlexxIT
Copy link
Owner

AlexxIT commented Oct 16, 2024

Probably Hass doesn't support OPUS audio for HomeKit

@haitham506
Copy link
Author

But it says here that it does

audio_codec string (Optional, default: libopus)

Only for camera entities. FFmpeg audio codec for transcoding. copy option reduces CPU load when audio source is already encoded with libopus.

https://www.home-assistant.io/integrations/homekit/#audio_codec

Doesn't that mean that it does support it?

Thank you for replying

@AlexxIT
Copy link
Owner

AlexxIT commented Oct 16, 2024

You can check Hass project issues. It has problems with OPUS codec. Because HomeKit uses non standard OPUS implementation. You can't copy it. You can't use FFmpeg for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants