mxpi_videodecoder
Function |
Decodes videos. Currently, only the H.264 and H.265 formats are supported. |
|---|---|
Synchronous/Asynchronous (Status) |
Asynchronous |
Constraints |
|
Plugin Base Class (Factory) |
mxpi_videodecoder |
Input/Output |
Input: buffer (data type: MxpiBuffer) and metadata (data type: MxpiFrame) Output: buffer (data type: MxpiBuffer) and metadata (data type: MxpiVisionList) |
Port Format (Caps) |
Static input: {"video/x-h264"} Static output: {"image/yuv"} |
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 |
inputVideoFormat |
Format of the input video stream. The default format is H.264. Currently, only H.264 or H.265 can be entered. If other formats are entered, an error is reported during running. The file format must be the same as that of the stream pulling plugin. The video format can now be obtained from the upstream plugin (such as the stream pulling plugin) without being set by users. Therefore, this property has been discarded. |
No |
Yes |
outputImageFormat |
Format of the output image to be decoded. The default format is YUV420SP_NV12. Currently, only YUV420SP_NV12 or YUV420SP_NV21 can be entered. If other formats are entered, an error is reported during running. |
No |
Yes |
vdecChannelId |
Video decoding channel ID. The default value is 0.
Each video decoding plugin must use a different decoding channel ID. |
No |
Yes |
outMode |
Frame output mode. The value can be 0 or 1. The default value is 0.
|
No |
Yes |
outPicWidthMax |
Maximum width of the decoded stream. The value ranges from 0 to 4096. |
No |
Yes |
outPicHeightMax |
Maximum height of decoded streams. The value ranges from 0 to 4096. |
No |
Yes |
skipFrame |
Quantity of skipped frames. The default value is 0. The value range is [0, 100]. |
No |
Yes |
vdecResizeWidth |
Resized width after decoding. The default value is 0, indicating that resizing is not performed. The value range is [0, 4096]. This parameter is reserved on the Atlas 200/300/500 inference product. |
No |
Yes |
vdecResizeHeight |
Resized height after decoding. The default value is 0, indicating that resizing is not performed. The value range is [0, 4096]. This parameter is reserved on the Atlas 200/300/500 inference product. |
No |
Yes |
There is a restriction on the internal input buffer of the decoding plugin. If the backend processing is slow, backpressure is triggered. As a result, the input buffer cannot be consumed. When frames are sent again, a sendframe error is reported. As a result, the decoding plugin cannot work properly.