Interface VideoEncoderConfiguration

VideoEncoderConfiguration is the interface that defines the video encoder configurations.

You can customize the video encoder configurations when calling [AgoraRTC.createCameraVideoTrack]IAgoraRTC.createCameraVideoTrack or [AgoraRTC.createScreenVideoTrack]IAgoraRTC.createScreenVideoTrack.

The SDK provides the preset video encoder configurations. For more information, see [[VideoEncoderConfigurationPreset]].

The actual bitrate may differ slightly from the value you set due to the limitations of the operation system or the web browser. Agora recommends setting the bitrate between 100 Kbps and 5000 Kbps.

interface VideoEncoderConfiguration {
    bitrateMax?: number;
    bitrateMin?: number;
    frameRate?: number | ConstrainLong;
    height?: number | ConstrainLong;
    width?: number | ConstrainLong;
}

Properties

bitrateMax?: number

The maximum bitrate of the video (Kbps).

bitrateMin?: number

The minimum bitrate of the video (Kbps).

frameRate?: number | ConstrainLong

Frame rate of the video (fps).

You can pass a number, or a constraint such as { max: 30, min: 5 }.

For details about the constraint, see [ConstrainLong]ConstrainLong.

height?: number | ConstrainLong

Height of the video.

You can pass a number, or a constraint such as { max: 1280, min: 720 }.

For more details about the constraint, see [ConstrainLong]ConstrainLong.

width?: number | ConstrainLong

Width of the video.

You can pass a number, or a constraint such as { max: 1280, min: 720 }.

For more details about the constraint, see [ConstrainLong]ConstrainLong.