DaFang 1080p DF3 Image Delay

I bought the following DaFang 1080p Camera Model DF3

https://www.zapalstyle.com/xiaomi-dafang-1080p-night-version-wifi-ip-camera.html

I have been able to get the custom firmware running and integrate it into homeassistant, while the picture is ok there is a significant delay in the picture, sometimes 10 seconds or more.

Is there a known way to improve this?

Thanks.

just to confirm, what firmware did you load on it?
Also you may want to make sure your camera sits close to your router / access point, that your access point is on a non crowded channel, and that you don’t have too much traffic going through it either.
It’s most likely more of a wWiFi optimise job than a camera…

@lolouk44 Thanks for the advice but I don’t see the wifi as an issue as performance through VLC is better.

I updated to the newest firmware a week ago, I don’t have it to hand at the moment but will post if required later.

Do you have the same model?

Hi @SimonT yes I have the same camera. It works well for me except the odd green /grey
screen .
What’s your HA setup? Hass.io? Docker? Other?
How did you connect the camera to your HA instance?

@lolouk44 I have HA setup on RPi 3B+ with Hassbian.

Can you share your config in the camera?

Mine is setup as:

  - platform: ffmpeg
    name: DaFang1
    input: rtsp://192.168.0.22:8554/unicast

The other config I had ended as below, there seems no performance difference with either.
input: -rtsp_transport tcp -i rtsp://dafang:8554/unicast

just realised I don’t have the dafang via RTSP on HA because I also use motion to do motion recording, so the URL I use in HA is the one that streams off motion.
That said, I have other cameras added as FFMPEG / RTSP, but I generally use the 2nd channel / lower resolution as I don’t need hi res streaming to just have a glance at what’s happening, I keep hi res for recording, this frees up my bandwidth (I have 6 cams in total)
Here’s my config if it helps…

I am unable to get any picture through mjpeg, I tried over the weekend without any joy. Are your different port numbers related to motion?

you won’t get a pic with MJPEG as it’s RTSP
The URLs in my camera.yaml file are the video streams provided by motion
in Motion I pull the RTSP, e.g. rtsp://192.168.0.33:8554/unicast
may be a silly question, but the video on HA’s front end only refreshes like once every 10 sec. If you click on it, you should see the live stream…

Hiya @lolouk44

you won’t get a pic with MJPEG as it’s RTSP

The camera has MJPEG service so I was expecting that I could get a picture through that.

may be a silly question, but the video on HA’s front end only refreshes like once every 10 sec. If you click on it, you should see the live stream…

That wasn’t a question :grinning: but even if it was it wouldn’t have been silly. It was a piece of information I was completely unaware of and very helpful! Thanks

Clicking on it gives a feed much closer to a live feed but it torn up to unrecognisable state with any kind of movement. This is progress so thanks a lot.

Not helping, but I have the same issue, and it seems to be a “known” problem if you search around. Please let me know if you find a way to solve it. VLC stream works nice, but in HA there is a significant delay if you open it up in “fullscreen”.

What I meant is in HA you need to set ip up as RTSP not MJPEG for it to work

I tried setting it up as ffmpeg on my side as well, and getting all the same issues as original poster here. I have the impression that if you run docker you need to install FFMPEG to get it to work, but not sure how that is solved in HASS.IO as it doesn’t seem to work as it should.

correct, you’ll need FFMPEG in docker. In hass.io it’s preinstalled…

again, maybe a stupid question :wink: but have you added this to your config.yaml?
ffmpeg:

@lolouk44 Yes I have the following in my config:

ffmpeg:
  ffmpeg_bin: /usr/bin/ffmpeg

Thanks

for some reason it worked better for me without additional parameters, but again I’m in standard docker not hass.io so you may try with and without to see the outcome