(Solved) - Feed delays over time then drops frames. Blue Iris and Dahua

Discussion in 'Troubleshooting' started by Pips, May 13, 2019.

Share This Page

  1. Pips

    Pips n3wb

    Joined:
    Dec 28, 2017
    Messages:
    13
    Likes Received:
    1
    Location:
    UK
    Update: Disable VPP fixed this issue

    My feeds generally work, but a feed will slowly get delayed, up to around 2 mins, then suddenly be live again and drop 2mins of video. I have memory cards in the cameras and they record this period locally with no issue, so something between Dahua and BI causes this issue.

    I record the local camera time from Dahua and the BI overlay so I can see what the delay is in the images attached. Normally this is a few seconds so all good. I have tried numerous settings with BI, below are the current ones. The feed images are before and just after the catch up. The delay took around 20mins to build up to 2mins before it cleared. It will then run in sync for ages until I see a repeat.

    I have Dahua (IPC-HDW5231R-ZE and SD49225T-HN) plus other brands. I only see this on the all the Dahua feeds but at different times.

    Any suggestions how to troubleshoot? CPU load is generally 50-60, decent network. I have removed several cameras to greatly reduce load but delay still occurs.

    Thanks

    BlueIris set1.jpg BlueIris set2.jpg UI3_-_Blue_Iris 1.jpg UI3_-_Blue_Iris 2.jpg
     
    Last edited: May 19, 2019 at 7:41 AM
  2. fenderman

    fenderman Staff Member

    Joined:
    Mar 9, 2014
    Messages:
    29,681
    Likes Received:
    8,944
    How is your network setup? Is the blue iris pc plugged into the router or the same switch as the cameras?
     
  3. Pips

    Pips n3wb

    Joined:
    Dec 28, 2017
    Messages:
    13
    Likes Received:
    1
    Location:
    UK
    BI PC is connected to the cameras via a single switch or two switches linked together depending on the camera. Decent Unifi poe switches in use. Only 1 remote camera uses a point to point radio link with high signal strength. same issues on all dahua cameras regardless if same switch, 2 switches or radio. Cameras that work with no issue are cheap wifi non dahua.
     
  4. fenderman

    fenderman Staff Member

    Joined:
    Mar 9, 2014
    Messages:
    29,681
    Likes Received:
    8,944
    What are your bitrates?
     
  5. fenderman

    fenderman Staff Member

    Joined:
    Mar 9, 2014
    Messages:
    29,681
    Likes Received:
    8,944
    also try selecting rtsp main steam from the dropdown or use find inspect.
     
  6. Pips

    Pips n3wb

    Joined:
    Dec 28, 2017
    Messages:
    13
    Likes Received:
    1
    Location:
    UK
    I've used a few different ones, mainly picked up on guidelines from this forum. Attached is the current setting. dahua1.jpg
     
  7. Pips

    Pips n3wb

    Joined:
    Dec 28, 2017
    Messages:
    13
    Likes Received:
    1
    Location:
    UK
    one camera is setup for rtsp main stream and has the same issue. Just used find inspect on another to see if that helps. new setup is attached dahua find.jpg
     
  8. SouthernYankee

    SouthernYankee IPCT Contributor

    Joined:
    Feb 15, 2018
    Messages:
    1,474
    Likes Received:
    790
    Location:
    Houston Tx
    For the problem camera set to bit rate type vbr
    Set frame rate and iframe to 10 or 12, the same value.
    I recommend all cameras use vbr and the same frame and iframe rate. Frame rate never over 15.

    You Indicated that the switch's were cascaded., Are the ports that connected the two switch's giga byte ports.
    I recommend this setup, the router connected to a gigabyte switch, the bi PC, and both Poe switches connected to the gigabyte switches.
     
    Last edited: May 14, 2019 at 9:34 AM
  9. Pips

    Pips n3wb

    Joined:
    Dec 28, 2017
    Messages:
    13
    Likes Received:
    1
    Location:
    UK
    iframe had a min of 15 in the dahua web interface, should I set them both to 15?
    yes all switch ports are gigabit.

    Thanks for helping
     
  10. bp2008

    bp2008 Staff Member

    Joined:
    Mar 10, 2014
    Messages:
    8,195
    Likes Received:
    5,075
    Matching the iframe interval to the frame rate is unlikely to help. This sounds like a clock sync problem so I'd suggest checking the box in BI video properties "Use RTSP/stream timecode". It is enabled for all of my cams, Dahua or otherwise.
     
    fenderman likes this.
  11. Pips

    Pips n3wb

    Joined:
    Dec 28, 2017
    Messages:
    13
    Likes Received:
    1
    Location:
    UK
    thanks, made that change and will see if it helps
     
  12. SouthernYankee

    SouthernYankee IPCT Contributor

    Joined:
    Feb 15, 2018
    Messages:
    1,474
    Likes Received:
    790
    Location:
    Houston Tx
    On some cameras the Iframe can not be set less than the frame rate, so only one iframe per second.

    I think the problem is an overload in the network path, as the OP indicated that there were drop frames.
    If running windows 10 have a screen shot of the task manager, make sure the GPU data is showing.

    It may be that the use of the BI time stamp is causing problems, BI may (not positive) need to decode the frame, insert the time stamp and re encode the frame.

    Also take a screen shot of the Status (three vertical bar button) camera tab. This shows all the cameras, there bit and frame rate.

    Is the problem camera on wifi ?
     
  13. Pips

    Pips n3wb

    Joined:
    Dec 28, 2017
    Messages:
    13
    Likes Received:
    1
    Location:
    UK
    No wifi cameras have an issue. The camera issue moves between my 4 Dahua cameras, doesn't happen at the same time. 3 are wired gigabit via unifi switches, 4th has an airmax radio link at 375Mbit high signal strength and usage around 2%.

    BI CPU load doesn't seem to spike, it's around 50-60. GPU is low. Dedicated server so no other tasks.
    I only turned on the BI time stamp to help troubleshoot, as without it I was unable to tell if the feed was delayed easily. Problem occurs with no overlays enabled at BI.
    I have 9 cameras in total. Problem only seen on the Dahua models. In group outside_dahua screen shot. Sorry I use groups so cameras show up multiple times.

    Thanks for the help everyone.
    task.jpg cameras.jpg

    task.jpg
     
  14. bp2008

    bp2008 Staff Member

    Joined:
    Mar 10, 2014
    Messages:
    8,195
    Likes Received:
    5,075
    Are you certain the stream is actually getting delayed and it is not just the timestamps drifting apart?

    A bit off topic, but that is overkill for one camera. You could reduce the channel width to its minimum value. It will lower the capacity (max bandwidth) of the link but make it receive and transmit less interference. Your output power might also be too high. Short range links with UBNT radios usually work great on minimum output power, further reducing interference created by your radios.
     
    fenderman likes this.
  15. bp2008

    bp2008 Staff Member

    Joined:
    Mar 10, 2014
    Messages:
    8,195
    Likes Received:
    5,075
    I wonder if the Blue Iris developer can provide some way of mitigating this issue or at least notifying users about delayed streams. UI3 does both. heh.

    This old patch note speaks of how BI buffers H.264 frames, and does not suggest an upper limit to the number of frames BI will buffer. As this buffer gets larger (more frames in it), there would be more apparent delay in the video playback.

    There are several reasons why video delay could increase. One reason is if the stream is too resource-intensive and the CPU can't keep up. However this does not seem to be the case here. 2 MP @ 15 FPS streams are easy for an i7-6700 at half load. Also if it was this issue then I would expect the delay to be very inconsistent, sometimes spiking up or down.

    Another reason for delay could be a minor timekeeping error in the system clock. This could explain a delay that is very slow and very steady, continually increasing to some point of failure. In this case, Blue Iris would be intentionally allowing frames to build up in the buffer because it thinks it is decoding at the right pace.
     
    fenderman likes this.
  16. SouthernYankee

    SouthernYankee IPCT Contributor

    Joined:
    Feb 15, 2018
    Messages:
    1,474
    Likes Received:
    790
    Location:
    Houston Tx
    It is strange that it moves between cameras.
    Do the cameras use the BI PC for there time source ?
    Do the cameras have a update time interval that seems to correspond to the resink of the time ?
     
  17. Pips

    Pips n3wb

    Joined:
    Dec 28, 2017
    Messages:
    13
    Likes Received:
    1
    Location:
    UK
    cameras use time.google.com update every 10mins and pc uses time.microsoft.com. They do show the same time when i check.
    Its very confusing!
     
  18. Pips

    Pips n3wb

    Joined:
    Dec 28, 2017
    Messages:
    13
    Likes Received:
    1
    Location:
    UK
    anyone have ideas how I can troubleshoot this? I made all the above changes but the issue still happens. It must be something with my setup as its common cameras with BI. Are there any logs or places I can look for ideas? I just don't know if I should be looking at cpu, network, camera settings etc...
     
  19. fenderman

    fenderman Staff Member

    Joined:
    Mar 9, 2014
    Messages:
    29,681
    Likes Received:
    8,944
    for hardware acceleration are you using intel only or vpp?
     
    bp2008 likes this.
  20. Pips

    Pips n3wb

    Joined:
    Dec 28, 2017
    Messages:
    13
    Likes Received:
    1
    Location:
    UK
    intel and vpp. i followed a post here about reducing cpu. should i try and disable that?