mxpi_videoencoder
Function |
Encodes videos. |
|---|---|
Synchronous/Asynchronous (Status) |
Asynchronous |
Constraints |
|
Plugin Base Class (Factory) |
mxpi_videoencoder |
Input/Output |
Input: buffer (data type: MxpiBuffer) and metadata (data type: MxpiVisionList) Output: buffer (data type: MxpiBuffer) |
Port Format (Caps) |
Static input: {"ANY"} Static output: {"ANY"} |
Property |
For details, see Table 1. |
Property Name |
Description |
Mandatory or Not |
Modifiable or Not |
|---|---|---|---|
deviceId |
Ascend device ID, which is specified by the deviceId property in the stream_config field. You do not need to set the ID. |
No |
Yes |
iFrameInterval |
Video I-frame interval. The default value is 30, and the value range is [1, 2000]. |
No |
Yes |
imageHeight |
Input image height. The default value is 1080. For the Atlas 200/300/500 inference product, the value ranges from 128 to 1920, and for the Atlas inference products, the value ranges from 128 to 4096. |
No |
Yes |
imageWidth |
Input image width. The default value is 1920. For the Atlas 200/300/500 inference product, the value ranges from 128 to 1920, and for the Atlas inference products, the value ranges from 128 to 4096. |
No |
Yes |
fps |
Indicates whether to print the video encoding frame rate. The default value is 0. The value can only be 0 or 1.
|
No |
Yes |
dataSource |
Index of the input data (generally the name of the upstream element). The default value is the key value of the output port of the upstream plugin. |
No |
Yes |
inputFormat |
Input image format. The default format is YUV420SP_NV12. Currently, only YUV420SP_NV12 or YUV420SP_NV21 can be entered. |
No |
Yes |
outputFormat |
Output stream format. The default format is H.264. Only H.264 or H.265 can be entered. |
No |
Yes |
vencChannelId |
Stream channel ID. The VENC and JPEGE share the same channel. The default value is 0. For the Atlas 200/300/500 inference product, the channel ID is allocated by the system. No need to set this parameter. For the Atlas inference products, the value ranges from 0 to 127. |
No |
Yes |
rcMode |
Bit rate control mode. The default value is 2. Possible values are as follows:
|
No |
Yes |
srcRate |
Frame rate (fps) of the input stream. The default value is 30. The value range is [1, 120]. |
No |
Yes |
maxBitRate |
Output bit rate (kbit/s). The default value is 300. The value range is [10, 30000]. |
No |
Yes |
ipProp |
Ratio of the number of bits in a single I frame to the number of bits in a single P frame in a GOP. The default value is 70 in CBR mode and 80 in VBR mode. The value range is [1, 100]. NOTE:
This property is not supported by the Atlas inference products. |
No |
Yes |