set-rec-control
Added in V1.3
Use the interface to modify recording configurations.
Obtain ranges of recording parameters by calling get-info.
"rec-control": {
"usb-option": [], // USB recording options
"sd-option": [], // options of recording to SD card (device internal storage)
"time-unit": [], // duration list of recording file, expressed in minutes
"file-ext": [] // file name extensions list
}
HTTP Request
GET http://ip/usapi?method=set-rec-control&usb-option=0&sd-option=2&root-folder=xxx&file-name-mode=xxx&time-unit=5
Parameter | Description |
---|---|
method | set-rec-control |
usb-option | Indicates the USB recording options. 0 indicates the USB recording is disabled. 1 indicates the USB recording is normal recording. |
sd-option | Indicates the SD recording options 0 indicates SD card recording is disabled. 1 indicates SD card recording is normal recording. 2 indicates SD card recording is loop recording. |
mime-type | Indicates the MIME type of recorded files. 0: mp4 1: mov |
root-folder | Indicates the folder name of recorded files. The default value is REC_Folder . Two-level directory is supported at most, which is separated by '/', such as a/b.The folder name is case-sensitive and should contain A-Z, a-z, 0-9, spaces and special characters like ._-+'/[](). The name can not start or end with spaces or /. |
file-name-mode | Prefix of the recorded file name. 0: Custom. The default value is' vid '. The characters include A-Z, a-z, 0-9, spaces ._-+'[](), and cannot start or end with spaces. 1: named after the file created time. |
time-unit | Indicates the duration of recorded files in minutes. The single file should not exceed 4G, that is time-unit * recording-bit-rate <= 4G. |
Response Body
{
"result": 0
}
Item | Description |
---|---|
result | 0 indicates that the request was accepted successfully. Refer to API Status Codes to find specific description for other values. |