Camera feed load times

I am wondering if this is normal, when I load a camera stream on a PC using the picture glace card. It opens a pop-up of the camera feed, but nothing plays and the timer is 0:00, then after 10 or so seconds I get the spinning circle for another few seconds and then the camera feed loads.

On iOS/Android the video seems like it almost fails to load but eventually it does load after 15-20 seconds.

Anyway to improve this delay, especially on mobile? I am using RTSP using the amcrest integration, to get the feed and camera sensors.

Yes, that’s normal for H264 streams via a browser (the app uses browser components too, AFAIK). You can possibly improve this by reading up on go2rtc. This is now built into HA.

There are too many things involved with cameras to iterate all of it here, unfortunately (and there are others that will know a lot more than me on this subject). Some people integrate their cameras with something like Frigate before exposing it to HA.

There’s also an abundance of info here: I tried all the camera platforms so you don't have to.

I was hoping with webrtc being built in since November, the delay would have improved. The November release says you don’t have to do anything, it should just work. However, I do not see that happening, maybe I need to enable something?

Frigate is on my list to setup, but it just seem tedious to setup since I’ll need to redo my existing camera setup.

It won’t work for all cameras. You’ll need to read up on your specific cameras’ capabilities to understand this better, or provide those details so others with the same setup can comment.

It’s included in the default config, but see above.

I forgot i wasn’t using the default config flag, once updated i think it’s working for a reolink camera but not any of my amcrest/dahua cameras.

All of my cameras are added with the amcrest integration using rtsp.

I reviewed my logs but couldn’t see anything specific to see if webrtc is working on all cameras.

EDIT:

I switched to the ONVIF integration, I get all my camera sensors, both streams and best of all almost instant video playback.

1 Like

You have preload camera stream set to on for each RTSP stream? I use RTSP from unifi and have essentially instant loading onto cards on the local LAN.

I suspect that more than enough RAM and processor on the HA machine helps.

Also, if you have enough resource, having a high and low res stream for each camera allows using the appropriate stream for the display device and network.

I have a lot of ThinkView devices and they don’t like receiving a bunch of 4K streams.

As a last resort, another option is to design you mobile app/workflow to use the camera’s native phone app.

where do i set these options, I’m using the basic picture glance card.

It’s not on the card. It on the specific stream entity. Which integration is streaming the camera feed?

Now using the onvif integration

Go to the camera device, click on the stream(s) you are using, click the cogwheel icon and enable preloading

I tried that and I’m not seeing much of a difference, after switching to onvif it is maybe 1-3 second delay.

Preloading on/off I’m not seeing any difference, on pc or ios, I’ll need to test on Android.

This is good enough for me, far better than were i started.

It may be the speed of the HA hardware. Have you looked at Glances to see the system load? x86 systems seem to handle camera streams without much impact. x86 have H.264 hardware acceleration

RTSP H.264 streams do work well now in HA, at least with adequate server hardware. I have HA on an older NUC.