get-record-encoder-params
Use the interface to get recording parameters.
Request Mode
POST http://ip/mwapi/get-record-encoder-params
Response Body
{
"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": 3,
"scheduleStartDate": 0,
"scheduleEndDate": 0,
"weeklyDate": 254,
"scheduleRecordTime": [
{
"startTime": 33180000,
"duration": 10000
}
],
"scheduleRecordCache": [
{
"scheduleMode": 1,
"scheduleStartDate": 1690560000000,
"scheduleEndDate": 1690560000000,
"weeklyDate": 0,
"scheduleRecordTime": [
{
"startTime": 1690570800000,
"duration": 370000
}
]
},
{
"scheduleMode": 2,
"scheduleStartDate": 1690387200000,
"scheduleEndDate": 1691164800000,
"weeklyDate": 0,
"scheduleRecordTime": [
{
"startTime": 1690398360000,
"duration": 17000
}
]
},
{
"scheduleMode": 3,
"scheduleStartDate": 0,
"scheduleEndDate": 0,
"weeklyDate": 254,
"scheduleRecordTime": [
{
"startTime": 33180000,
"duration": 10000
}
]
}
],
"encode-params": "{\"resolutions\":[{\"name\":\"1080P\",\"value\":\"1920x1080\"},{\"name\":\"720P\",\"value\":\"1280x720\"}],\"durations\":[{\"name\":\"60 FPS\",\"value\":\"166666\"},{\"name\":\"30 FPS\",\"value\":\"333333\"}],\"videoBitrates\":[{\"name\":\"20 Mbps\",\"value\":\"20480\"},{\"name\":\"16 Mbps\",\"value\":\"16384\"},{\"name\":\"8 Mbps\",\"value\":\"8192\"},{\"name\":\"4 Mbps\",\"value\":\"4096\"},{\"name\":\"2 Mbps\",\"value\":\"2048\"},{\"name\":\"1 Mbps\",\"value\":\"1024\"},{\"name\":\"512 Kbps\",\"value\":\"512\"}],\"codeType\":[{\"name\":\"H.264\",\"value\":\"0\"}],\"Profile\":[{\"name\":\"Baseline\",\"value\":\"0\"},{\"name\":\"Main Profile\",\"value\":\"1\"},{\"name\":\"High Profile\",\"value\":\"2\"}],\"encodingMode\":[{\"name\":\"VBR\",\"value\":\"0\"},{\"name\":\"CBR\",\"value\":\"1\"}],\"keyframeInterval\":[{\"name\":\"1s\",\"value\":\"1\"},{\"name\":\"2s\",\"value\":\"2\"},{\"name\":\"3s\",\"value\":\"3\"},{\"name\":\"4s\",\"value\":\"4\"},{\"name\":\"5s\",\"value\":\"5\"},{\"name\":\"6s\",\"value\":\"6\"},{\"name\":\"7s\",\"value\":\"7\"},{\"name\":\"8s\",\"value\":\"8\"},{\"name\":\"9s\",\"value\":\"9\"},{\"name\":\"10s\",\"value\":\"10\"},{\"name\":\"15s\",\"value\":\"15\"},{\"name\":\"20s\",\"value\":\"20\"},{\"name\":\"25s\",\"value\":\"25\"},{\"name\":\"30s\",\"value\":\"30\"}],\"audioCode\":[{\"name\":\"48Khz,aac,48kbps\",\"value\":\"48\"},{\"name\":\"48Khz,aac,64kbps\",\"value\":\"64\"},{\"name\":\"48Khz,aac,96kbps\",\"value\":\"96\"},{\"name\":\"48Khz,aac,128kbps\",\"value\":\"128\"},{\"name\":\"48Khz,aac,192kbps\",\"value\":\"192\"},{\"name\":\"48Khz,aac,256kbps\",\"value\":\"256\"}],\"savePath\":[{\"name\":\"Internal Storage\",\"value\":\"/data/resource/album\"}],\"splitByTime\":[{\"name\":\"10 minutes\",\"value\":\"10\"},{\"name\":\"20 minutes\",\"value\":\"20\"},{\"name\":\"30 minutes\",\"value\":\"30\"},{\"name\":\"1 hour\",\"value\":\"60\"},{\"name\":\"1.5 hours\",\"value\":\"90\"},{\"name\":\"2 hours\",\"value\":\"120\"}],\"splitBySize\":[{\"name\":\"100 MB\",\"value\":\"100\"},{\"name\":\"200 MB\",\"value\":\"200\"},{\"name\":\"500 MB\",\"value\":\"500\"},{\"name\":\"1 GB\",\"value\":\"1024\"},{\"name\":\"1.5 GB\",\"value\":\"1536\"},{\"name\":\"2 GB\",\"value\":\"2048\"},{\"name\":\"2.5 GB\",\"value\":\"2560\"},{\"name\":\"3 GB\",\"value\":\"3072\"},{\"name\":\"3.5 GB\",\"value\":\"3584\"},{\"name\":\"4 GB\",\"value\":\"4096\"}],\"fileExtention\":[{\"name\":\"MP4\",\"value\":\"0\"},{\"name\":\"MOV\",\"value\":\"1\"}],\"recordSources\":[{\"name\":\"Program\",\"value\":\"0\"},{\"name\":\"HDMI 1\",\"value\":\"1\"},{\"name\":\"HDMI 2\",\"value\":\"2\"},{\"name\":\"Web Camera\",\"value\":\"3\"}]}",
"recording": 0,
"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. |
recording | Whether it is recording |
duration | The frame interval |
video-bitrate | The video encoding bitrate, in KB |
resolution | The resolution |
codeType | The code 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 audio 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 |
savePath | The save path. |
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: One day 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 |
scheduleRecordTime | Configuration of a recording schedule |
scheduleRecordCache | Setting history of recording schedules |
encode-params | The range of available encoding parameters |
scheduleRecordTime |Name|Description| |:----|:----| |startTime |The start time of schedule (only the value of hours, minutes and seconds), in ms | |duration |The duration of the schedule, in ms |
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;