To apply optimization algorithms for different real-time engagement scenarios, Agora provides a setChannelProfile
method for the RTC channel. You can use this method to set the channel profile as either CHANNEL_PROFILE_COMMUNICATION
or CHANNEL_PROFILE_LIVE_BROADCASTING
.
These two channel profiles differ in the following aspects:
An RTC channel differentiates users by roles. Once a user joins a channel, the user can be either of the following:
The default user role in different channel profiles are different:
CHANNEL_PROFILE_COMMUNICATION
: Host. You cannot change the user role.CHANNEL_PROFILE_LIVE_BROADCASTING
: Audience. You can call setClientRole
to change the user role.setClientRole
alone does not take effect. For details, see How can I use co-host token authentication.The default audio route refers to the route that audio data takes within a device, such as the speakerphone or earpiece of a mobile phone.
On Android and iOS, Agora uses different default audio routes depending on the channel profile:
CHANNEL_PROFILE_COMMUNICATION
CHANNEL_PROFILE_LIVE_BROADCASTING
: The default audio route is the speakerphone.The bitrate
member in the setVideoEncoderConfiguration
method sets the video encoding bitrate. Given the same resolution and frame rate, when you set bitrate
as the default value, STANDARD_BITRATE(0)
, the value of the encoding bitrate in the LIVE_BROADCASTING
profile doubles that in the COMMUNICATION
profile.
In the following table, the base bitrate applies to the COMMUNICATION
profile, while the live bitrate applies to LIVE_BROADCASTING
.
Resolution (px) | Frame rate (fps) | Base bitrate (Kbps) | Live bitrate (Kbps) |
---|---|---|---|
160 × 120 | 15 | 65 | 130 |
320 × 180 | 15 | 140 | 280 |
640 × 360 | 30 | 600 | 1,200 |
848 × 480 | 30 | 930 | 1,860 |
The values of bitrate in the table above are for reference only. For the detailed video profile table, see API reference.
Based on the differences above, Agora recommends setting the channel profile according to your scenario:
CHANNEL_PROFILE_COMMUNICATION
.CHANNEL_PROFILE_LIVE_BROADCASTING
.