VideoEncoder

Function Usage

Constructor of the VideoEncoder class.

If the memory is insufficient, pyVencCallBacker cannot register a callback, or the processor cannot be identified. As a result, the "std::runtime_error" exception occurs.

Prototype

1
VideoEncoder(pyVencConfig: VideoEncodeConfig, pyVencCallBacker: VencCallBacker, deviceId: int, channelId: int)

Input Parameters

Parameter

Type

Description

pyVencConfig

VideoEncodeConfig class

Video encoding parameter.

For details about the structure parameters, see VideoEncodeConfig.

pyVencCallBacker

VencCallBacker class

VencCallBacker that binds callbacks. (A call must be registered. Otherwise, VideoEncoder throws an exception.)

deviceId

int

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

Value range: [0, Number of detected processors – 1].

channelId

int

Video stream index of the video encoder. The default value is 0.

  • Atlas 200/300/500 inference product: Only one VideoEncoder can be instantiated. Therefore, you do not need to set channelId.
  • Atlas 200I/500 A2 inference product: Only one VideoEncoder can be instantiated. Therefore, you do not need to set channelId.
  • Atlas inference product: The value range is [0, 127].

Response Parameters

VideoEncoder object