# initWithWidth:height:frameRate:bitrate:orientationMode:mirrorMode: (/zh-CN/api-reference/rtc/macos/api-videoencoderconfiguration-initwithwidth)

> For AI agents: see the complete documentation index at [llms.txt](/llms.txt).

<a id="api_videoencoderconfiguration_initwithwidth__prototype"></a>

```objc
- (instancetype _Nonnull)initWithWidth:(NSInteger)width
                                height:(NSInteger)height
                             frameRate:(NSInteger)frameRate
                               bitrate:(NSInteger)bitrate
                       orientationMode:(AgoraVideoOutputOrientationMode)orientationMode
                            mirrorMode:(AgoraVideoMirrorMode)mirrorMode NS_SWIFT_NAME(init(width:height:frameRate:bitrate:orientationMode:mirrorMode:));
```

<a id="api_videoencoderconfiguration_initwithwidth__detailed_desc"></a>

<a id="api_videoencoderconfiguration_initwithwidth__parameters"></a>

## 参数 [#参数]

<ParameterList>
<a id="width"></a>
<Parameter name="width">

视频的宽度。

</Parameter>
<a id="height"></a>
<Parameter name="height">

视频的高度。

</Parameter>
<a id="framerate"></a>
<Parameter name="frameRate">

视频帧率，详见 [AgoraVideoFrameRate](/zh-CN/api-reference/rtc/macos/enum-framerate)。

</Parameter>
<a id="bitrate"></a>
<Parameter name="bitrate">

编码视频的码率。

</Parameter>
<a id="orientationmode"></a>
<Parameter name="orientationMode">

编码视频的方向模式，详见 [AgoraVideoOutputOrientationMode](/zh-CN/api-reference/rtc/macos/enum-orientationmode)。

</Parameter>
<a id="mirrormode"></a>
<Parameter name="mirrorMode">

设置本地视频流的镜像模式，仅影响远端用户看到的视频，详见 [AgoraVideoMirrorMode](/zh-CN/api-reference/rtc/macos/enum-videomirrormodetype)。

</Parameter>
</ParameterList>

<a id="api_videoencoderconfiguration_initwithwidth__return_values"></a>

## 返回值 [#返回值]

方法调用成功，返回 [AgoraVideoEncoderConfiguration](/zh-CN/api-reference/rtc/macos/class-videoencoderconfiguration) 对象。

### 所属接口类 [#所属接口类]

- [AgoraVideoEncoderConfiguration](/zh-CN/api-reference/rtc/macos/class-videoencoderconfiguration)
