SetParams
Function Usage
Sets the encoding parameters of the encoder.
Restrictions
This parameter passes through the parameters listed in Configuration Parameters to VmiEncoderParams. The restrictions on these parameters are still valid.
Prototype
EncoderRetCode SetParams(const VmiEncoderParams& params)
Parameter Description
Parameter |
Input/Output |
Type |
Description |
|---|---|---|---|
params |
Input |
struct VmiEncoderParams |
Encoding parameters to be set. |
The struct declaration of VmiEncoderParams is as follows:
struct VmiEncoderParams {
uint32_t bitRate = 3000000;
uint32_t gopSize = 30;
uint32_t profile = 1;
uint32_t keyFrame = 0;
uint32_t rcMode = 2; // Rate control mode
uint32_t crf = 34; // CRF bit rate control level
uint32_t maxCrfRate = 20000000; // Maximum CRF bit rate
int32_t vbvBufferSize = 1000; // Size of the CRF bit rate buffer
};
Return Value Description
Data type: EncoderRetCode
The value can be any of the following:
VIDEO_ENCODER_SUCCESS: The encoder is successfully set.
Parent topic: Encoding APIs (C and C++)