Homekit Camera not able to live stream

Hi All,
I have several IP camera added to HA via ONVIF. I added the camera to Homekit in accessory mode.
When I open Home app in iPhone, I can see the snapshot update every 10s. But when I click to open the camera for live streaming, it goes in to no response. I was able view the live stream in HA iOS app.
I used to fixed the issue in another environment, it seems a network issue. But I can’t remember it. Does anyone have the same issue and know the solutions?
Here is the configuration

  • name: Living Camera
    port: 21066
    filter:
    include_entities:
    - camera.living_mainstream
    entity_config:
    camera.living_mainstream:
    stream_source: “-rtsp_transport tcp -i -re rtsp://admin:[email protected]/Streaming/Channels/1”
    video_codec: copy
    support_audio: True
    mode: accessory

I have the same issue and no solution yet.

This thread is talking about the same : HomeKit camera entity - live streaming - #6 by ausun

Yes, that reply was also posted by me. Last time after I posted that reply, I found a solution and it seems related to some network settings. But can’t remember it now and I can’t remember where I found that. :sweat_smile:

:laughing:
didn’t realize it was your thread as well.

networking issue, that’s a great lead, i’m going to search in that direction

Do you have some complex network ? like multiple vlans with your ios device and home assistant separated by a firewall?

Yes, my iOS devices in one VLAN and my HA system and Camera in another VLAN.

That’s probably your issue.

I guess your firewall allows new connection from iOS to HA and replies from HA to iOS

I read somewhere (didn’t kept the link, I think it was on reddit) that for camera streaming to work properly you also need to allow new connections from HA to iOS.

You can either put them in the same vlan or configue the firewall to allow new connections from HA/HK to your iOS devices.

My problem is different tho, I have a mjpeg camera and it looks like I have transcoding issues with ffmpeg :frowning:

Hi
I have the same problem, did you find a solution to your issue?

Yes, I have it fixed now. I finally found that HomeKit video only support H.264. My previous cam configuration was H.265.

Thanks! Which is the correct configuration for this in HA?

You may check if you cam was set to H.264.

Can you be a little more specific? This is very vague.

Perhaps state where you set that and provid a code example?

This is the setting of IP Cam. It would be different for each brand. You may check the support article for your camera.

Two things

  1. Make sure your camera can support h.264 stream.
  2. Turn off VPN if any in the ios/macos device which you are using to look at the stream (This was the issue for me). I use PIA VPN, and when I turned it off, I was able to look at the stream without any latency

I have the same problema with a Axis P3343 camera, im using the H264 profile to streaming, checked with VLC but when tray to open the stream from Home App it goes in to no rsponse.

I would be greatful with some help.
Best Regards!