Camera setup¶
Cang reads files that cameras have already written to a shared storage location — it does not push settings to cameras. However, the camera must be configured correctly for cang to receive useful data. This page covers recommended settings for supported camera types.
Dahua cameras¶
Tested on the DH-IPC-HFW2841T-ZS and DH-IPC-HDW2849TM-S-IL. Settings and menu paths should be similar across most Dahua IPC firmware versions.
Log in as admin¶
Config changes on Dahua cameras require the built-in admin account. Sub-accounts (operator or user level) can browse settings but saving will fail — the web UI shows "Save failed!" with no further explanation.
Snapshot settings¶
Navigate to Camera → Video → Snapshot.
| Setting | Recommended value | Notes |
|---|---|---|
| Snapshot Type | General | |
| Snapshot Strategy | Same as Main Stream | Matches the main stream resolution |
| Quality | 6 (Best) | |
| Interval | 60 s | Set the dropdown to Customized first, then enter the value. Accepts 1–50000 s. Lower values give denser coverage at the cost of storage. |
Note
The snapshot interval setting requires a firmware that exposes the Customized interval option. If you only see a fixed set of intervals in the dropdown, check whether a firmware update is available for your model.
Saving settings via the CGI API¶
If the web UI consistently refuses to save (even when logged in as admin), you can write settings directly via the camera's HTTP CGI API. The camera must be reachable over the network from the machine running the command.
Get current snapshot schedule config:
curl --digest -u admin:<YOUR_PASSWORD> \
'http://<CAMERA_IP>/cgi-bin/configManager.cgi?action=getConfig&name=Snap'
The camera uses HTTP Digest authentication — pass --digest, not --basic.
For more complex config changes (such as snapshot interval), the camera's JSON-RPC
endpoint at /RPC2 gives access to the same config manager used by the web UI. Capture
the relevant request from your browser's developer tools (Network tab → any POST to
/RPC2) to obtain a valid session token, then replay or modify the request with curl.