|
static final VideoDimensions | VD_120x120 = new VideoDimensions(120, 120) |
|
static final VideoDimensions | VD_160x120 = new VideoDimensions(160, 120) |
|
static final VideoDimensions | VD_180x180 = new VideoDimensions(180, 180) |
|
static final VideoDimensions | VD_240x180 = new VideoDimensions(240, 180) |
|
static final VideoDimensions | VD_320x180 = new VideoDimensions(320, 180) |
|
static final VideoDimensions | VD_240x240 = new VideoDimensions(240, 240) |
|
static final VideoDimensions | VD_320x240 = new VideoDimensions(320, 240) |
|
static final VideoDimensions | VD_424x240 = new VideoDimensions(424, 240) |
|
static final VideoDimensions | VD_360x360 = new VideoDimensions(360, 360) |
|
static final VideoDimensions | VD_480x360 = new VideoDimensions(480, 360) |
|
static final VideoDimensions | VD_640x360 = new VideoDimensions(640, 360) |
|
static final VideoDimensions | VD_480x480 = new VideoDimensions(480, 480) |
|
static final VideoDimensions | VD_640x480 = new VideoDimensions(640, 480) |
|
static final VideoDimensions | VD_840x480 = new VideoDimensions(840, 480) |
|
static final VideoDimensions | VD_960x720 = new VideoDimensions(960, 720) |
|
static final VideoDimensions | VD_1280x720 = new VideoDimensions(1280, 720) |
|
static final VideoDimensions | VD_1920x1080 = new VideoDimensions(1920, 1080) |
|
static final VideoDimensions | VD_2540x1440 = new VideoDimensions(2540, 1440) |
|
static final VideoDimensions | VD_3840x2160 = new VideoDimensions(3840, 2160) |
|
static final int | STANDARD_BITRATE = 0 |
|
static final int | COMPATIBLE_BITRATE = -1 |
|
static final int | DEFAULT_MIN_BITRATE = -1 |
|
static final int | DEFAULT_MIN_FRAMERATE = -1 |
|
static final int | DEFAULT_MIN_BITRATE_EQUAL_TO_TARGET_BITRATE = -2 |
|
The video encoder configuration.
int io.agora.rtc2.video.VideoEncoderConfiguration.bitrate |
The bitrate of the video (Kbps). Refer to the table below and set your bitrate. If you set a bitrate beyond the proper range, the SDK automatically adjusts it to a value within the range. You can also choose from the following options:
- STANDARD_BITRATE(0): (Recommended) The standard bitrate mode. In this mode, the bitrates differ between the Live Broadcast and Communication profiles:
- In the Communication profile, the video bitrate is the same as the base bitrate.
- In the Live Broadcast profile, the video bitrate is twice the base bitrate.
- COMPATIBLE_BITRATE(-1): The compatible bitrate mode. In this mode, the bitrate stays the same regardless of the profile. If you choose this mode for the Live Broadcast profile, the video frame rate may be lower than the set value.
Agora uses different video codecs for different profiles to optimize the user experience. For example, the Communication profile prioritizes the smoothness while the Live Broadcast profile prioritizes the video quality (a higher bitrate). Therefore, We recommend setting this parameter as STANDARD_BITRATE = 0.
Video Bitrate Table
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 |
- Note
- The base bitrate in this table applies to the Communication profile. The Live Broadcast profile generally requires a higher bitrate for better video quality. We recommend setting the bitrate mode as STANDARD_BITRATE = 0. You can also set the bitrate as the base bitrate value × 2.