VideoEncodeConfig
Parameter |
Type |
Description |
|---|---|---|
width |
int |
Width of the encoded video frame data. The default value is 1920. The value must be the same as the width (original_width) of the image to be encoded.
|
height |
int |
Height of the encoded video frame data. The default value is 1080. The value must be the same as the height (original_height) of the image to be encoded.
|
outputVideoFormat |
StreamFormat enumerations |
Output video format after encoding. The default value is base.h264_main_level. |
inputImageFormat |
image_format enumerations |
Input image format. Only base.nv12 (default) and base.nv21 are supported. |
keyFrameInterval |
int |
Video I-frame interval. The default value is 30, and the value range is [1, 2000]. |
srcRate |
int |
Frame rate of input streams, in fps. The default value is 30.
|
rcMode |
int |
Bit rate control mode. The values are as follows:
|
maxBitRate |
int |
Output bit rate, in kbit/s. The default value is 300.
|
ipProp |
int |
I-frame to P-frame bit allocation ratio within a GOP. The value ranges from 1 to 100 and defaults to 70. |
Recommended Configuration
The following table lists the recommended parameter settings that ensure good video encoding quality during video collection. In other scenarios, adjust the parameter settings as required.
Picture Quality/Resolution |
srcRate |
keyFrameInterval |
maxBitRate |
|---|---|---|---|
4K 3840 * 2160/4096 * 2160 |
25 or 30 |
50 or 60 |
|
2K 2560 x 1440 |
25 or 30 |
50 or 60 |
|
1080p (Blu-ray) 1920 x 1080 |
25 or 30 |
50 or 60 |
|
720p (HD) 1280 x 720 |
25 or 30 |
50 or 60 |
|
480p/D1_N (SD) 854 x 480/720 x 480 |
25 or 30 |
50 or 60 |
|
576P/D1 (SD) 720 x 576 |
25 or 30 |
50 or 60 |
|
270p (smooth) 480 x 270 |
25 or 30 |
50 or 60 |
- |
CIF P/N 352 x 288/320 x 240 |
25 or 30 |
50 or 60 |
|