H.265 generic camera won't integrate

I have four H.264 cameras running in Home Assistant as RTSP streams but have just bought my first H.265-only camera (generic Chinese) and the Home Assistant generic camera integration does not work for this: it spins forever trying to generate the preview image.

VLC is able to view the stream (H.265, 1920x1080, 20 FPS, VBR (have also tried CBR), no audio) from the same URL (rtsp://10.10.2.5:554/user=xxxx&password=yyyy&channel=1&stream=0.sdp?real_stream). Obviously I have set no “Verify SSL” and authentication is not employed.

Can anyone suggest either (a) how I might debug what is upsetting the integration (I’ve tried ticking “enable debug” but that provides no additional logging output during the integration process) or (b) whether there is another camera integration that might work for me.

If i know correctly HA doesn’t “know” h265. I have a bunch of cameras, too and if i set any of them to h265 image is lost, too. I “kinda” solved this by setting main stream to h265 and substream to h264, then i only use substream in HA.

So, if you can’t set it to h264 i guess you’re stuck…

Gah, I was afraid of that. Strange omission, since H.265 is pretty common (though admittedly this is the first camera I have come across without a H.264 fallback option). I will post a feature request against the generic camera integration, if there isn’t already one there.

Note that while H.265 works on Android and iOS, it does not work in many browsers. This is a browser limitation and not a Home Assistant issue. Safari has native H.265 support, and H.265 also works in Edge on Windows when “HEVC Video Extensions” is installed. Chrome versions >= 104 may also work when started with the --enable-features=PlatformHEVCDecoderSupport option.

https://www.home-assistant.io/integrations/stream/#technical-details

Thanks for that: I’ve tried starting Chrome (v135) with --enable-features=PlatformHEVCDecoderSupport and also tried (V135) with the h265ify extension added but I still can’t get as far as working preview during set-up. It is not a huge problem as my video monitoring application (Shinobi) works fine, just a shame not to have this camera join all my others in Home Assistant.

Ah well.

The only other thing I can think of is that some camera manufactures have their own version of h.265 for example dahuas’ have h.265+. Do your cameras have more than one h.256 setting, changing to the standard h.265 if set otherwise may do the trick.

The camera says it has H.265 and H.265+; I have H.265 selected. I tried a few different formats and frame-rates but nothing has helped, so far. What I would really like is some debug out of HA that gives me an indication as to where it is getting stuck.

It must be something else than just edge and/or Chrome problem. Why? Because i have one camera where mainstream is set to h265 and substream is set to h264. When i add this camera to HA with onvif i only get substream image, mainstream is not even available as option, i can’t add it no matter what i try. Only if i change mainstream to h264 then mainstream appears on HA’s onvif section. But if i change substream to h265 also then i have no images in my HA onvif part.

1 Like