Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface VideoEncoderConfiguration

VideoEncoderConfiguration

Hierarchy

  • VideoEncoderConfiguration

Index

Properties

bitrate

bitrate: number

The video encoding bitrate (Kbps). Choose one of the following options:

  • 0: (Recommended) The standard bitrate.
    • The Communication profile: the encoding bitrate equals the base bitrate.
    • The Live-broadcast profile: the encoding bitrate is twice the base bitrate.
  • 1: The compatible bitrate: the bitrate stays the same regardless of the profile.

The Communication profile prioritizes smoothness, while the Live-broadcast profile prioritizes video quality (requiring a higher bitrate). We recommend setting the bitrate mode as #STANDARD_BITRATE to address this difference.

The following table lists the recommended video encoder configurations, where the base bitrate applies to the Communication profile. Set your bitrate based on this table. If you set a bitrate beyond the proper range, the SDK automatically sets it to within the range.

Resolution Frame Rate (fps) Base Bitrate (Kbps, for Communication) Live Bitrate (Kbps, for Live Broadcast)
160 × 120 15 65 130
120 × 120 15 50 100
320 × 180 15 140 280
180 × 180 15 100 200
240 × 180 15 120 240
320 × 240 15 200 400
240 × 240 15 140 280
424 × 240 15 220 440
640 × 360 15 400 800
360 × 360 15 260 520
640 × 360 30 600 1200
360 × 360 30 400 800
480 × 360 15 320 640
480 × 360 30 490 980
640 × 480 15 500 1000
480 × 480 15 400 800
640 × 480 30 750 1500
480 × 480 30 600 1200
848 × 480 15 610 1220
848 × 480 30 930 1860
640 × 480 10 400 800
1280 × 720 15 1130 2260
1280 × 720 30 1710 3420
960 × 720 15 910 1820
960 × 720 30 1380 2760

degradationPreference

degradationPreference: DegradationPreference

The video encoding degradation preference under limited bandwidth. See DegradationPreference.

frameRate

frameRate: number

The frame rate of the video. Note that we do not recommend setting this to a value greater than 30.

height

height: number

Height (pixels) of the video.

minBitrate

minBitrate: number

The minimum encoding bitrate (Kbps). The default value is 1. Using a value greater than the default value forces the video encoder to output high-quality images but may cause more packet loss and hence sacrifice the smoothness of the video transmission. That said, unless you have special requirements for image quality, Agora does not recommend changing this value.

minFrameRate

minFrameRate: number

The minimum frame rate of the video. The default value is -1.

orientationMode

orientationMode: OrientationMode

The orientation mode. See OrientationMode.

width

width: number

Width (pixels) of the video.