Get recording parameters

1. API Description

This API is used get recording parameters.

Request mode:

  • V2.6.0 and above: POST [ip]/mwapi/V2.0/output/get-record-encoder-params
  • V2.5.0 and below: POST [ip]/mwapi/get-record-encoder-params
Administrator Rights Logged-in
No Yes

2. Input Parameters

None

3. Output Parameters

Name Type Description
status Int Status code
recording Int Whether it is recording
0: No; 1: Yes
duration Int Frame interval
video-bitrate Int Video encoding bitrate, in KB
resolution String Resolution, width X height
codeType Int Encoding method
0: H.264; 1: H.265
profile Int Encoding profile
0: Baseline; 1: Main Profile; 2: High Profile
encodingMode Int Encoding mode
0: VBR; 1: CBR
keyframeInterval Int Keyframe interval, in s
audioBitrate Int Audio encoding bitrate, in KB
splitMode Int File splitting mode
0: by size; 1: by time
splitBlock Int Splitting interval
By size, in MB
By time: in minutes
fileNamePrefix String Filename prefix
savePath String Save path
fileExtention Int File extension
0: MP4; 1: MOV
recordSourceId Int Recording source
0: Program; 1: HDMI 1; 2: HDMI 2; 3: Web Camera
recordWithAudio Int Whether to record audio
0: No; 1: Yes
scheduleMode Int Recording schedule mode
0: None; 1: One day; 2: Daily; 3: Weekly
scheduleStartDate Int Start timestamp of schedule, in ms
scheduleEndDate Int End timestamp of schedule, in ms
weeklyDate Int Weekly repeat time, binary flags
0: Disabled
Sunday: 1st bit (0x1LL << 1)
Monday: 2nd bit (0x1LL << 2)
Tuesday: 3rd bit (0x1LL << 3)
Wednesday: 4th bit (0x1LL << 4)
Thursday: 5th bit (0x1LL << 5)
Friday: 6th bit (0x1LL << 6)
Saturday: 7th bit (0x1LL << 7)
scheduleRecordTime ScheduleRecordTime Configuration of recording schedule
scheduleRecordCache Array Setting history of recording schedule
encode-params Array The range of available encoding parameters
ScheduleRecordTime
Name Type Description
startTime Int Start time of schedule (only the value of hours, minutes and seconds), in ms
duration Int Duration of the schedule, in ms

4. Example

Getting recording parameters.

Input Example
None
Output Example
{
    "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
}

5. Error Code

The following only lists the error codes related to the API business logic. For other error codes, see Common Error Codes.

Status Definition Description
49 MW_STATUS_INVALID_DATA Data not initialized, system error

results matching ""

    No results matching ""