set-video
Added at V2.2 Use this interface to configure parameters of the main and sub streams, including:
- resolution
- frame interval
- video codec: choose H264 or HEVC for the main stream. The sub stream uses H264.
- H264/HEVC profile
- video bit rate
- keyframe interval
- quantization range
- aspect ratio
- rotation
Obtain parameters range using get-info.
{
"codec-cap": {
"resolutions": [], // range of resolution
"durations": [], // range of frame interval
"video-codec": [], // range of video codec
"profile": [], // H264 profile
"hevc-profile": [], // HEVC profile
"video-kbps": [], // range of video bit rate
"gop-sec": [], // range of keyframe interval
"video-range": [], // range of quantization
"video-ar-convert-mode": []£¬// range of aspect ratio conversion
"video-rotation: [] // range of video rotation angle
}
}
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 the stream type. 0: the main stream 1: the sub stream |
is-auto | Indicates whether the stream format follows that of input signal. For a sub stream, this parameter can only be set to 0. 0: custom the format for your session. 1: follow input. |
cx | Indicates width of resolution dimensions in pixels. |
cy | Indicates height of resolution dimensions in pixels. |
duration | Indicates frame interval. |
kbps | Indicates bit rate. |
gop | Indicates keyframe interval. |
fourcc | Reserved. The default value is 0. |
codec | Indicates video codec. |
profile | Indicates encoding profile. |
cbrstat | Reserved. |
fullrange | Indicates quantization range. |
is-vbr | 0: CBR 1: VBR, the maximum and minimum steps are required |
min-vbr-qp | min-step ranges from 0 to 51 |
max-vbr-qp | max-step ranges from minimum to 51 |
is-time-code-sei | 0: not to set time code SEI messages 1: use system time 2: use input source time code |
is-closed-caption-sei | 0: not to set CC SEI messages 1: set CC SEI messages |
ar-convert-mode | 0: Ignore 1: Cropping 2: Padding |
rotation | 0: 0° 90: rotate 90° 180: rotate 180° 270: rotate 270° |
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. |