set-record-encoder-format
Use the interface to set recording parameters.
Request Mode
POST http://ip/mwapi/set-record-encoder-format
Name | Description |
---|---|
duration | The frame interval |
video-bitrate | The video encoding bitrate, in KB |
resolution | The resolution |
codeType | The codec type. 0: H.264 1: H.265 |
profile | 0: Baseline, 1: Main Profile, 2: High Profile |
encodingMode | 0: VBR, 1: CBR |
keyframeInterval | The keyframe interval, in s |
audioBitrate | The video encoding bitrate, in KB |
splitMode | The file split mode. 0: by size 1: by time |
splitBlock | The file split size. By size, in MB By time: in minutes |
fileNamePrefix | The filename prefix |
fileExtention | The file extension. 0: MP4 1: MOV |
recordSourceId | The recording source ID. 0: Program 1: HDMI 1 2: HDMI 2 3: Web Camera |
recordWithAudio | Whether to record with the audio |
scheduleMode | The recording schedule mode. 0: None 1: Once 2: Daily 3: Weekly |
scheduleStartDate | The start date of schedule, in ms |
scheduleEndDate | The end date of schedule, in ms |
weeklyDate | The weekly date for repeating recording |
scheduleRecordStartTime | The start time of schedule recording, in ms |
scheduleRecordDuration | The duration of schedule recording, in ms |
{
"duration": 166666,
"video-bitrate": 2048,
"resolution": "1920x1080",
"codeType": 0,
"profile": 0,
"encodingMode": 1,
"keyframeInterval": 2,
"audioBitrate": 128,
"splitMode": 0,
"splitBlock": 2048,
"fileNamePrefix": "UF_",
"savePath": "/data/resource/album",
"fileExtention":1,
"recordSourceId":0,
"recordWithAudio":1,
"scheduleMode": 2,
"scheduleStartDate": 1659456000000,
"scheduleEndDate": 1660838400000,
"weeklyDate": 0,
"scheduleRecordStartTime": 1659456000000,
"scheduleRecordDuration": 61505000
}
weeklyDate
typedef enum _record_schedule_day {
RECORD_SCHEDULE_DAY_NONE = 0,
RECORD_SCHEDULE_DAY_SUN = (0x1LL << 1),
RECORD_SCHEDULE_DAY_MON = (0x1LL << 2),
RECORD_SCHEDULE_DAY_TUE = (0x1LL << 3),
RECORD_SCHEDULE_DAY_WED = (0x1LL << 4),
RECORD_SCHEDULE_DAY_THU = (0x1LL << 5),
RECORD_SCHEDULE_DAY_FRI = (0x1LL << 6),
RECORD_SCHEDULE_DAY_SAT = (0x1LL << 7),
} record_schedule_day_t;
Response Body
{
"message": "success",
"status": 0
}
Name | Description |
---|---|
status | 0 indicates that the request was accepted successfully. Refer to API Status Codes to find specific description for other values. |