VideoEncoder

Function Usage

Constructor of the VideoEncoder class. If the construction fails due to insufficient memory or an unidentified processor, the "std::runtime_error" exception occurs.

Prototype

VideoEncoder(const VideoEncodeConfig& vEncodeConfig, const int32_t deviceId = 0,
             const uint32_t channelId = 0);

Parameter Description

Parameter

Input/Output

Description

vEncodeConfig

Input

Parameters for video encoding (transferred in a structure)

The maximum resolution (width x height) for video encoding cannot exceed 4096 x 2304.

deviceId

Input

Processor where the video encoder is deployed. The default ID is 0.

Value range: [0, Number of identified processors - 1].

channelId

Input

Video stream index of the video encoder

  • For the Atlas 200/300/500 inference product, only one video encoder can be instantiated. Therefore, you do not need to set channelId.
  • For the Atlas inference products, the value ranges from 0 to 127.