encodeParams
Variable Description
Encoding parameters.
Restrictions
Currently, only the constant bit rate (CBR) mode is supported.
Variable Data Definition
struct EncodeParams {
uint32_t bitrate = 3000000; // Bit rate
uint32_t gopSize = 30; // I-frame interval
ProfileType profile = MAIN; // Encoding complexity
RCMode rcMode = CBR; // Rate control mode
uint32_t forceKeyFrame = 0; // Forcibly generate an I-frame in frame N after the setting. 0 indicates that the setting does not take effect.
bool interpolation = false; // Frame interpolation
} __attribute__((packed));
enum ProfileType : uint32_t {
BASELINE,
MAIN,
HIGH
};
enum RCMode : uint32_t {
ABR, // Average bit rate, not supported currently
CRF, // Constant rate factor, not supported currently
CBR, // Constant bit rate
CAPPED_CRF, // Capped CRF, not supported currently
RC_MODE_MAX
};
Parent topic: Configuration Parameters