I have a standard procedure that I try to follow when setting up an new camera.
1) Set the password and change to a fixed IP address.
2) Video: H264H, CBR, 20 fps, I=20, highest possible bit rate
3) Shutter - manual, 1/60 sec
4) Noise reduction - low or even off
5) Next I start testing in the day time
6) Image should already be reasonable
7) Set shutter speed for no motion blur with whatever targets are of interest.
8) This exposure time should never be exceeded except possibly as a trade off for noise at night.
9) Change fixed shutter speed to 0-X mS based on no motion blur.
10) Now I look at bit rate to see when the target images degrade.
11) Often I just leave it at max bit rate.
12) Increase noise reduction, but ensure no target degradation.
13) Setup Dahua Sunrise/Sunset application for camera
14) Start looking at dawn/dusk/night video
15) From here on all tweaks are by seat-of-pants
I feel that setting the shutter speed and video parameters are necessary first steps. After that everything is art.