Dahuas lose custom bitrate upon reboot. Any work around?

guykuo

Getting comfortable
Jul 7, 2018
709
2,071
Sammamish, WA
Anyone have a fix or work around for Dahuas losing custom bitrate setting upon rebooting? They reboot and end up with some super low bitrate values.

Manually logging into every camera and correcting the settings after restarts is painful with over a dozen cameras.
 
Have you diagnosed what is causing the reboots? (Physical impairment, or setting somewhere) Please elaborate on your setup, NVR/PC with Blue Iris etc. I currently have my cameras connected to a POE switch that is on a UPS, and they only reboot when forced to.
 
My reboots have been for extended power outages or I reboot because it got "stuck".
 
Wittaj,
Is your custom bit rate a high one? Would the camera retain ROI settings after a reboot? It may be a workaround but would take some monitoring of bandwidth used. I'm still not familiar enough with ipcams. I'd assume that they would retain their settings. My only other generic thought would be to ensure they are running the latest firmware.
When you physically reboot them, are you simply power cycling them, or using the web interface? My cameras have a reboot, and a reset, which resets to default.

<LINK> Anyone know anything about the ROI tab? REGION OF INTEREST
 
extended power outages or I reboot because it got "stuck"

Same here. No NVR either, but that is beside the main point. It matters not why the reboots. They aren't often nor recurrent. However, camera reboots are inevitable and not necessarily caused intentionally.
My cameras can run for months without issue, but if they somehow do go down, Dahuas lose their custom bitrate settings whether via power off/on or web GUI reboot. There is no indication besides monitoring each camera's bit rate. All other camera settings seem to be preserved, but custom bit rates somehow are not.

So the question stands. Is there a way to work around or avoid the bit rate change that happens whenever the camera reboots?

Does ROI for the entire image set to 6 imply a bandwidth limit?
 
I have found that with my Loryta(thought it was a dahua generic, haven't researched) as well as my LTS(Hikvision generics) with ROI enabled, it will surpass the max rate I have set with VBR (variable bit rate). One large region can be drawn over the whole frame, just monitor the bandwidth to ensure that it doesn't become too much of a bandwidth hog.
 
What model camera ?
Where did you purchase the camera ?
Is the camera upgradable ?
 
  • Like
Reactions: c hris527
Over the years I have encountered issues described by the OP with Dahua USA or Rebranded Dahua Cameras and NVR's with settings loss after a reboot.
It may have not been bit rate my in this case but loss recording, motion, and other custom settings. In the cameras and NVR's. In evey case it was a firmware Issue or a bad or corrupted Image. Dahua has a bad track record with firmware especially the non USA stuff. Another thing you can try is to do a factory reset on the device, then put your settings in and see if they stay put , If they do not stay then you can try the firmware route, Contact the seller and see if they have a fix for the issue, As @SouthernYankee has described in post 10, more info on the hardware would be helpful.
 
  • Like
Reactions: SouthernYankee
I see the loss of custom bitrate post reboot on the following models with firmware versions. All are upgradable, English versions from Andy except the last one.

Dahua IPC-HDW5541H-AS-PV 2.800.0000000.6.R, Build Date: 2019-08-01
Dahua SD1A404XB-GNR 2.800.0000000.15.R.P9.4a8, Build Date: 2019-08-02
Dahua PTZ SD49225T-HN 2.800.0000000.4.R.R4.2510.9A.NR, Build Date: 2019-11-05
Dahua IPC-HFW5231E-Z12E 2.800.0000013.0.R, Build Date: 2019-12-02
Dahua SD1A203T-GN 2.800.0000000.4.R.R4.383, Build Date: 2019-11-05
Dahua IPC-HDW4631C-A 2.460.GP01.16.R, Build Date: 2017-09-04

I thought of using a python script to periodically set the bit rate, but the API command doesn't seem to work for the newest firmware. Only returns error.

The following works only on old 2017 firmware

http://<ip>/cgi-bin/configManager.cgi?action=setConfig&Encode[0]MainFormat[0].Video.BitRate=8960

Have not found a newer API with a different command yet.
 
Last edited:
Might not be your issue, bit I've found on certain dahua products that the website is not loading the right settings at first, and until you click the refresh button on the page (for example the encode page has a refresh button at the end of the settings list) you won't get the right settings and any change you've made won't be recorded.
 
  • Like
Reactions: c hris527
Seems funny all those cams have the same issue, are you pushing them beyond the spec?, post your settings, I can recreate them on a few of my cams, I do NOT use VBR but can see what mine are doing in respect to what your settings are. Can't hurt to try. Are you using h264 or 265?
 
VBR, most are H264H, just the 4MP higher are on H265.
They run just fine with max allowed rates 8192, 10240, 20480 depending on the model. Lower and I can see degraded imaging especially on the 4MP and higher units.
To replicate, set to VBR, set a custom rate, say 4000 or 6000. Save the setting. Reboot the camera and see what the bitrate setting becomes. Usually drops to a ridiculously lower value - well below even the highest non-custom menu option.

I suspect Dahua simply isn't writing the custom rate to EEPROM when saving settings.

If we had the dang API for the newer firmware, I would simply have a python script reset the bitrate once a day. Unfortunately, can't get the new firmware to accept the commands.

I also tried to see if using the highest, NON-custom menu option was acceptable. That does get retained between boots, but is low enough to degrade imaging.
 

Attachments

  • video custom setting 5MP.jpg
    video custom setting 5MP.jpg
    73.6 KB · Views: 24
Last edited:
I have an old dahua ipc-hfw1320s set the bit rate to custom with a value of 4224. Rebooted the camera and the value was the same unchanged.
2.620.0000002.0.R, Build Date: 2017-08-30

On dahua chinese hack IPC-HDW4433C-A set the bit rate to custom with a value of 4224. Rebooted the camera and the value was the same unchanged.
2.621.0000.28.R, Build Date: 2017-09-12


The reboot was done using the camera reboot button, not a power down,
 
SouthernYankee, would you mind repeating that test with a different custom value? This was with VBR right? I ask because one Dahua document said that with VBR the bitrate is "null"
Also, which browser are you doing it from? I'm using Chrome under MacOs. The cameras say the setting is stored. Revisiting the web GUI shows the custom value, but reboot changes the setting.
 
set with VBR. All my cameras use VBR.
Reran test with 6666 custom bit rate, no problems.
I am using chrome (Version 79.0.3945.117 (Official Build) (64-bit) ). But not viewing the video only the configuration.

Please note that my reboot is not a power down reboot. It is using the reboot button in the camera.
 
Thanks for the additional test and info. Really weird I'm seeing this happen. I see it on both power off/on and GUI reboots