Solutions for camera feed delays? Alternative camera platform options?

Testing a Reolink 520 with HA. RTSP works well out of the box but there is a 15+ second delay. I have tried the preload stream option as well as _sub feeds that are lower quality (640x480). All have the same delay. VLC, the phone app, Mac app, etc have virtually no delay.

I have tried a couple other ways of consuming the feed (ffmpeg, reolink custom component) in HA but all methods have the same delay.

Based on a bunch of reading it seems like this can only be solved by changing the keyframe settings on the camera itself, which the Reolink does not support.

Edit: Got the ONVIF integration working (port 8000 for reolink instead of default 5000) which immediately cut the delay down to about 5-10 seconds but it’s inconsistent and won’t always load the feed in the UI (maybe a browser issue). Sub stream was disabled by default after setting up the integration. Managed to get it working by disabling the main stream and rebooting but seems the delay is increase compared to the main stream.

Maybe I can work on optimizing ONVIF? Are there any other alternatives?

using MJPEG will be the best way to cut down latency. HA will take RTSP and RTMP and transcode it to an HLS stream. By doing so, you will always have the 15 sec delay. A MJPEG feed will be near instant. You can use MotionEye either as a stand alone or as a plugin which will provide a nicer UI and will auto convert RTSP for a MPEG stream.

2 Likes

Great! I will try to test out some of that soon!

Played around with MotionEye and it’s pretty buggy. There is also a huge delay of about 90 seconds out of the box and the feed playback is jerky. According to the timestamp in the view feed it’s refreshing every second but the images only update every 2 seconds or so. It doesn’t seem to be a resources issue on the server (Pi4) as the CPU usage is < 10% and RAM is less than 30%

I configured MotionEye integration with my Reolink camera using RTSP and then set up the webhook api to fire a script to switch on outside lights after sunset. It works but I have about a 30 second delay

So I thought I would try ONVIF integration to see if this was any faster however I’m stuck !

I understand that the Reolink Camera supports ONVIF 2.1 however when I add in the integration it only shows two entities. Main Stream and Sub stream.

Does this mean I cannot access motion detection via ONVIF as I am not sure of the steps to add a Binary motion sensor to the camera?

My Setup:-

Reolink 520 5MP Camera - PoE (November 2020 Firmware)

Gigabit LAN

Rasp 3b+

HA latest version 0.118.2

Hi,

I also have huge delays, however they vary from time to time.

I am using Blue Iris for all my cams, a HiKam, two Foscam and two Wansview. When I open the streams Blue Iris offers me in a browser directly or through the BlueIris WebUI, I have a very low delay, like one second maybe.

But when I put them into my dashboard using MJPEG, I experience delays up two 29 seconds, even when using MJPEG. I also tried it through the Blue Iris integration, with the same result.

Right now I stopped using streams in Home Assistant, its just useless to have a cam with such a delay. However I would love to integrate some in my dashboard if it was possible to get rid of the delays.

Regards

Do you get the same delay when viewing the MJPEG feed in a web browser?

No, this occurs only in Home Assistant. When I open the exact same URL I use in the HA configuration in the browser, I have no delay at all (maybe 1/2 - 1 second).

Also there are huge differences, sometimes it is up to 28 secs, sometimes only 5 to 10. Sometimes the BlueIris integration has less delay, sometimes the feed I configured manually.

Update:

After not testing this for a while, I had a lot of Updates in the meantime. I now reconfigured everything and have no more delays with MJPEG now.

Dont know what the cause was, but happy to have it working.

1 Like

could you share on how you do MJPEG? thanks

For cameras that come through the Blue Iris integration I just configure it in the Integration, its a selection there.

For cams configured in YAML just configure them as mjpeg cam.