set-video

Use the interface to configure parameters of the main and sub stream including:

  • resolution
  • frame interval
  • video code type: choose H264 or HEVC for the main stream. But it can only be H264 when live or mws is set to 0: main stream in set-stream. By default, sub stream is using H264.
  • encode quality
  • video bit rate
  • keyframe interval
  • quantization range
  • bit rate stats duration

Obtain ranges of parameters using get-info.

{
  "codec-cap": {
    "resolutions": [],           // range of resolution
    "durations": [],             // range of frame interval
    "video-codec": [],           // range of video code type
    "profile": [],               // range of H264 encoding profile
    "hevc-profile": [],          // range of HEVC encoding profile
    "video-kbps": [],            // range of video bit rate
    "gop-sec": [],               // range of keyframe interval
    "video-range": [],           // range of quantization range
    "stat-sec": []               // range of bit rate stats duration
  }
}

HTTP Request

GET http://ip/usapi?method=set-video&stream=0&is-auto=0&cx=1280&cy=720&duration=333333&kbps=1024&gop=1&fourcc=0&profile=2&cbrstat=60&fullrange=1&codec=0
Parameter Description
method set-video
stream Indicates stream type.
0: main stream
1: sub stream
is-auto Indicates whether to set stream type automatically. The sub stream can only be set when it is 0.
0: custom
1: auto
cx Indicates width of resolution dimensions, in pixels.
cy Indicates height of resolution dimensions, in pixels.
duration Indicates frame rate.
kbps Indicates bit rate of video coding.
gop Indicates keyframe interval.
fourcc Reserved. The default value is 0.
codec Indicates code type.
profile Indicates encoding profile.
cbrstat Indicates bit rate stats duration.
fullrange Indicates quantization range.

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.

results matching ""

    No results matching ""

    results matching ""

      No results matching ""