---
title: encodeParams
description: "编码参数。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengboostkithistory/240RC1/armnative/kunpengcpsvideo_16_0033.html
sourcePath: /source/zh/kunpengboostkithistory/240RC1/armnative/kunpengcpsvideo_16_0033.html
indexId: 35b754aa90eecbbef91cbca13eaf9688cf6bfeac7338f46ae0adfb1fa4c0b75d79
---
# encodeParams

#### 变量说明

编码参数。


#### 约束说明

流控模式暂时只支持CBR恒定码率模式。


#### 变量数据定义

```
struct EncodeParams {
uint32_t bitrate = 3000000;             // 码率
uint32_t gopSize = 30;                  // I帧间隔
ProfileType profile = MAIN;             // 编码复杂度
RCMode rcMode = CBR;                    // 流控模式
uint32_t forceKeyFrame = 0;             // 在设置后第N帧强制生成I帧，0表示不生效
bool interpolation = false;             // 补帧开关
} __attribute__((packed));
enum ProfileType : uint32_t {
BASELINE,
MAIN,
HIGH
};
enum RCMode : uint32_t  {
ABR,                       // 平均码率，暂不支持
CRF,                       // 画质优先，暂不支持
CBR,                       // 恒定码率
CAPPED_CRF,                // 画质优先，但限制码率，暂不支持
RC_MODE_MAX
};
```
