Dahuas lose custom bitrate upon reboot. Any work around?

I was able to replicate this on a IPC-T5442TM-AS on V2.800.0000000.10.R, Build Date: 2019-11-18.
I had my bitrate set at 10240, rebooted under System>Auto Maintain>Manual Reboot. When the camera came back up it was set to 8162. I set the bitrate to 20480, left the camera alone for 2 days, rebooted, came back up as 8162.

settings.JPG
 
WooHoo! Turns out the API command DOES work on the newer firmware. I made a syntax error when testing against the newer firmware. Also, be sure that requested bitrate is in the camera's allowed range or it won't work despite the OK response.

The Dahua custom bitrate amnesia problem can be worked around with a python script.
I have SecuritySpy set to run the script once a day to fix the rate on any cameras that rebooted spontaneously.
Also, I can manually trigger the script if I restart a camera.

PHP sample script is below. Add a new call sequence for each camera. Of course your camera ip for <ip> and desired bitrate for nnnn


import requests
from requests.auth import HTTPDigestAuth

#set bitrate of a camera
url = 'http://<ip>/cgi-bin/configManager.cgi?action=setConfig&Encode[0].MainFormat[0].Video.BitRate=nnnn'
requests.get(url, auth=HTTPDigestAuth('USERNAME', 'PASSWORD'))

#set bitrate of 2nd camera
url = 'http://<ip>/cgi-bin/configManager.cgi?action=setConfig&Encode[0].MainFormat[0].Video.BitRate=nnnn'
requests.get(url, auth=HTTPDigestAuth('USERNAME', 'PASSWORD'))

#set bitrate of 3rd camera
url = 'http://<ip>/cgi-bin/configManager.cgi?action=setConfig&Encode[0].MainFormat[0].Video.BitRate=nnnn'
requests.get(url, auth=HTTPDigestAuth('USERNAME', 'PASSWORD'))
 
Last edited:
WooHoo! Turns out the API command DOES work on the newer firmware. I made a syntax error when testing against the newer firmware. Also, be sure that requested bitrate is in the camera's allowed range or it won't work despite the OK response.

The Dahua custom bitrate amnesia problem can be worked around with a python script.
I have SecuritySpy set to run the script once a day to fix the rate on any cameras that rebooted spontaneously.
Also, I can manually trigger the script if I restart a camera.

PHP sample script is below. Add a new call sequence for each camera. Of course your camera ip for <ip> and desired bitrate for nnnn


import requests
from requests.auth import HTTPDigestAuth

#set bitrate of a camera
url = 'http://<ip>/cgi-bin/configManager.cgi?action=setConfig&Encode[0].MainFormat[0].Video.BitRate=nnnn'
requests.get(url, auth=HTTPDigestAuth('USERNAME', 'PASSWORD'))

#set bitrate of 2nd camera
url = 'http://<ip>/cgi-bin/configManager.cgi?action=setConfig&Encode[0].MainFormat[0].Video.BitRate=nnnn'
requests.get(url, auth=HTTPDigestAuth('USERNAME', 'PASSWORD'))

#set bitrate of 3rd camera
url = 'http://<ip>/cgi-bin/configManager.cgi?action=setConfig&Encode[0].MainFormat[0].Video.BitRate=nnnn'
requests.get(url, auth=HTTPDigestAuth('USERNAME', 'PASSWORD'))

Thank you for this! I have a bunch of Dahua cams that would always be a PITA to reset bitrate after taking a power hit. After reading your post, I made a python script and have it executing daily via task scheduler. Works like a charm.
 
Hi all, I'm running 2 x DH-IPC-HDW3867EM & 1 x DH-IPC-PDW3849 on a DHI-NVR4104HS-P-AI NVR and if I restart the cameras, my bitrate (not a custom one) gets reduced from max available 10240 to 3072 & from H.264H to H.265. Is there a fix for this other than running a script? I mean this is 2025 now.
 
You may have the NVR causing this problem. Via the NVR menu, camera/camera list. Make sure H265 Auto Switch is toggled off.
 
My two 4K-X bullets do it, none of my other cameras do. It’s a FW thing.
That model has an Andy FW that fixes it, but having deployed it on another 4K-X it made the oversharpness and artifacts even worse, so I live with it and reset that one camera when I have a power outage or reboot the NVR
 
I was able to replicate this on a IPC-T5442TM-AS on V2.800.0000000.10.R, Build Date: 2019-11-18.
I had my bitrate set at 10240, rebooted under System>Auto Maintain>Manual Reboot. When the camera came back up it was set to 8162. I set the bitrate to 20480, left the camera alone for 2 days, rebooted, came back up as 8162.

View attachment 53841
The NVR will not allow beyond Reference Bit Rate - I have tested on my NVR
 
I have an IPC HFW5231E-Z12E bought from Andy many years ago that will not retain any new settings after a power loss or reboot. After it boots back up I have to reset video encoding, time tittle position, channel title position and string, profile management, backlight, audio, and one IVS rule. After setting everything works fine until the next reboot.

I believe the settings are returning to something set long ago, definitely not back to factory defaults. It's like the camera no longer updates some NVRAM that is supposed to retain the settings between reboots. Another identical camera (same model, same firmware, and same age) does not have this problem. The problem camera was unused / unpowered for a couple of years - it did not have this problem before being stored.

Anyone know if there is a button battery in the camera that may have died? Or any other ideas? In the meantime I have pulled the camera and it is back in storage.
 
I have an IPC HFW5231E-Z12E bought from Andy many years ago that will not retain any new settings after a power loss or reboot. After it boots back up I have to reset video encoding, time tittle position, channel title position and string, profile management, backlight, audio, and one IVS rule. After setting everything works fine until the next reboot.

I believe the settings are returning to something set long ago, definitely not back to factory defaults. It's like the camera no longer updates some NVRAM that is supposed to retain the settings between reboots. Another identical camera (same model, same firmware, and same age) does not have this problem. The problem camera was unused / unpowered for a couple of years - it did not have this problem before being stored.

Anyone know if there is a button battery in the camera that may have died? Or any other ideas? In the meantime I have pulled the camera and it is back in storage.
 
I have an IPC HFW5231E-Z12E bought from Andy many years ago that will not retain any new settings after a power loss or reboot. After it boots back up I have to reset video encoding, time tittle position, channel title position and string, profile management, backlight, audio, and one IVS rule. After setting everything works fine until the next reboot.

I believe the settings are returning to something set long ago, definitely not back to factory defaults. It's like the camera no longer updates some NVRAM that is supposed to retain the settings between reboots. Another identical camera (same model, same firmware, and same age) does not have this problem. The problem camera was unused / unpowered for a couple of years - it did not have this problem before being stored.

Anyone know if there is a button battery in the camera that may have died? Or any other ideas? In the meantime I have pulled the camera and it is back in storage.
 
I have an IPC HFW5231E-Z12E bought from Andy many years ago that will not retain any new settings after a power loss or reboot. After it boots back up I have to reset video encoding, time tittle position, channel title position and string, profile management, backlight, audio, and one IVS rule. After setting everything works fine until the next reboot.

I believe the settings are returning to something set long ago, definitely not back to factory defaults. It's like the camera no longer updates some NVRAM that is supposed to retain the settings between reboots. Another identical camera (same model, same firmware, and same age) does not have this problem. The problem camera was unused / unpowered for a couple of years - it did not have this problem before being stored.

Anyone know if there is a button battery in the camera that may have died? Or any other ideas? In the meantime I have pulled the camera and it is back in storage.
Perhaps you can post the fourth same message, so I can understand the issue?
 
  • Like
Reactions: Oneup
I have an IPC HFW5231E-Z12E bought from Andy many years ago that will not retain any new settings after a power loss or reboot. After it boots back up I have to reset video encoding, time tittle position, channel title position and string, profile management, backlight, audio, and one IVS rule. After setting everything works fine until the next reboot.

I believe the settings are returning to something set long ago, definitely not back to factory defaults. It's like the camera no longer updates some NVRAM that is supposed to retain the settings between reboots. Another identical camera (same model, same firmware, and same age) does not have this problem. The problem camera was unused / unpowered for a couple of years - it did not have this problem before being stored.

Anyone know if there is a button battery in the camera that may have died? Or any other ideas? In the meantime I have pulled the camera and it is back in storage.