Fix Camera Lag

I have 2 amcrest cameras (ip2m-841b) and one eufy indoor camera. I have them all working but the video is delayed atleast 15-20 seconds which makes this not very valuable for a security camera. what can i do to improve the responsiveness of the cameras so that it is as close to real time as possible. also for the cameras what should i add to the entries below to get the PTZ working along with motion notifications.

I am running on Pi 3B and the CPU and Memory looks fine.

amcrest:

  • host: 192.168.1.xxx
    username: admin
    password: xxxxxx
    resolution: low
    name: Office
  • host: 192.168.1.xxx
    username: admin
    password: xxxxxx
    name: Garage
    resolution: low

#Connect to eufy camera
camera:

  • platform: ffmpeg
    name: Living Room Camera
    input: ā€œrtsp://192.168.1.xxx:554/live0ā€

First, can you check with your RTSP URLs through VLC to see if the lag exists at the camera/network? With VLC open, use File > Open Network and paste in your RTSP url. Itā€™s more likely that the delay is on the camera or networkā€™s side than HA and if thatā€™s the case, thereā€™s nothing you can do short of getting better cameras.

2 Likes

Indeed. My cctv system exposes rtsp streams that I use to feed them into homeassistant and the delay is exactly 10 seconds, which Iā€™ve concluded is ā€˜by designā€™.

In fairness, if someone is burgling the house and Iā€™m relaying what Iā€™m seeing to the emergency services by phone, Iā€™m thinking if I say ā€œheā€™s leaving now and gone towards the pubā€, but actually he left 10 seconds ago, heā€™s still 30 seconds from the pub, so itā€™s not that bad :slightly_smiling_face:

Itā€™s also quite good because if you hear a bang outside you can grab the phone, open homeassistant, open the camera and see what caused it.

1 Like

I have confirmed that in VLC the lag does not exists. I see motion on my cameras almost immediately. However through home assistant i can stand up and count to 15-20 seconds before the movement will be shown properly.

Being almost 20 seconds behind is a concern from a security perspective.

Are you looking at the same camera substream that HA is using for display?