If you still have access to the camera's web interface or mobile app, these are the cleanest ways to restore factory defaults.
Caveat: Using incorrect firmware may brick the device. Prefer manufacturer sources. how to reset dahua ip camera without reset button better
Revives “dead” cameras that won’t respond to ping or ConfigTool. If you still have access to the camera's