Configure capture mode
This guide shows you how to read and set the capture mode on an Axis camera. To understand what capture mode is, see What is capture mode.
Prerequisites
You need:
- An Axis camera:
<ip>to replace in commands - Camera user credentials with operator or administrator privileges:
<user>and<pass>to replace in commands curl
How to read available capture modes
You can read the available capture modes through capturemode.cgi:
curl -s -d "{\"apiVersion\": 1.0, \"method\": \"getCaptureModes\"}" --anyauth -u '<user>:<pass>' "http://<ip>/axis-cgi/capturemode.cgi"
This returns a list of available capture modes for each image source:
{
"apiVersion": "1.0",
"context": "",
"method": "getCaptureModes",
"data": [
{
"channel": 0,
"captureMode": [
{
"captureModeId": 0,
"maxFPS": 12.5,
"enabled": true,
"description": "360° overview @ 15/12.5 fps dewarped views WDR"
},
{
"captureModeId": 1,
"enabled": false,
"description": "360° overview only @ 30/25 fps no WDR"
}
]
}
]
}
The enabled field shows which mode is currently active.
How to set a capture mode
To change channel 0's capture mode to capture mode 1, send the following:
curl -s -d "{\"apiVersion\": 1.0, \"method\": \"setCaptureMode\", \"channel\": 0, \"captureModeId\": 1}" --anyauth -u '<user>:<pass>' "http://<ip>/axis-cgi/capturemode.cgi"
On success, it returns:
{
"apiVersion": "1.0",
"context": "",
"method": "setCaptureMode",
"data": {}
}
How to reboot the device
The new capture mode takes effect only after a reboot. Send the following to firmwaremanagement.cgi:
curl -s -d "{\"apiVersion\": \"1.0\", \"method\": \"reboot\"}" --anyauth -u '<user>:<pass>' "http://<ip>/axis-cgi/firmwaremanagement.cgi"
On success, the device reboots and responds with:
{
"apiVersion": "1.8",
"method": "reboot",
"data": {}
}