Agora Java API Reference for Android
|
#include <AgoraBase.h>
Public Member Functions | |
VideoEncoderConfiguration (const VideoDimensions &d, int f, int b, ORIENTATION_MODE m, VIDEO_MIRROR_MODE_TYPE mirror=VIDEO_MIRROR_MODE_DISABLED) | |
VideoEncoderConfiguration (int width, int height, int f, int b, ORIENTATION_MODE m, VIDEO_MIRROR_MODE_TYPE mirror=VIDEO_MIRROR_MODE_DISABLED) | |
VideoEncoderConfiguration (const VideoEncoderConfiguration &config) | |
Public Attributes | |
VIDEO_CODEC_TYPE | codecType |
VideoDimensions | dimensions |
int | frameRate |
int | bitrate |
int | minBitrate |
ORIENTATION_MODE | orientationMode |
DEGRADATION_PREFERENCE | degradationPreference |
VIDEO_MIRROR_MODE_TYPE | mirrorMode |
The definition of the VideoEncoderConfiguration struct.
VIDEO_CODEC_TYPE agora::rtc::VideoEncoderConfiguration::codecType |
The video encoder code type: #VIDEO_CODEC_TYPE.
VideoDimensions agora::rtc::VideoEncoderConfiguration::dimensions |
The video dimension: VideoDimensions.
int agora::rtc::VideoEncoderConfiguration::frameRate |
The frame rate of the video. You can set it manually, or choose one from #FRAME_RATE.
int agora::rtc::VideoEncoderConfiguration::bitrate |
The bitrate (Kbps) of the video.
Refer to the Video Bitrate 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:
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.
Resolution | Frame Rate (fps) | Base Bitrate (Kbps) | Live Bitrate (Kbps) |
---|---|---|---|
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 |
1920 * 1080 | 15 | 2080 | 4160 |
1920 * 1080 | 30 | 3150 | 6300 |
1920 * 1080 | 60 | 4780 | 6500 |
2560 * 1440 | 30 | 4850 | 6500 |
2560 * 1440 | 60 | 6500 | 6500 |
3840 * 2160 | 30 | 6500 | 6500 |
3840 * 2160 | 60 | 6500 | 6500 |
int agora::rtc::VideoEncoderConfiguration::minBitrate |
(For future use) The minimum encoding bitrate (Kbps).
The Agora SDK automatically adjusts the encoding bitrate to adapt to the network conditions.
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.
ORIENTATION_MODE agora::rtc::VideoEncoderConfiguration::orientationMode |
The video orientation mode: #ORIENTATION_MODE.
DEGRADATION_PREFERENCE agora::rtc::VideoEncoderConfiguration::degradationPreference |
The video degradation preference under limited bandwidth: #DEGRADATION_PREFERENCE.
VIDEO_MIRROR_MODE_TYPE agora::rtc::VideoEncoderConfiguration::mirrorMode |
If mirror_type is set to VIDEO_MIRROR_MODE_ENABLED, then the video frame would be mirrored before encoding.