Classes | |
enum | AudioCodecProfileType |
enum | AudioSampleRateType |
class | TranscodingUser |
enum | VideoCodecProfileType |
enum | VideoCodecType |
Public Member Functions | |
void | addWatermark (AgoraImage watermark) |
boolean | removeWatermark (AgoraImage watermark) |
ArrayList< AgoraImage > | getWatermarkList () |
void | addBackgroundImage (AgoraImage backgroundImage) |
boolean | removeBackgroundImage (AgoraImage backgroundImage) |
ArrayList< AgoraImage > | getBackgroundImageList () |
void | setAdvancedFeatures (String featureName, Boolean opened) |
Map< String, Boolean > | getAdvancedFeatures () |
int | addUser (TranscodingUser user) |
final ArrayList< TranscodingUser > | getUsers () |
void | setUsers (ArrayList< TranscodingUser > users) |
void | setUsers (Map< Integer, TranscodingUser > users) |
int | removeUser (int uid) |
int | getUserCount () |
int | getBackgroundColor () |
void | setBackgroundColor (int color) |
void | setBackgroundColor (int red, int green, int blue) |
int | getRed () |
int | getGreen () |
int | getBlue () |
void | setRed (int red) |
void | setGreen (int green) |
void | setBlue (int blue) |
Public Attributes | |
int | width |
int | height |
int | videoBitrate |
int | videoFramerate |
boolean | lowLatency |
int | videoGop |
AgoraImage | watermark |
AgoraImage | backgroundImage |
AudioSampleRateType | audioSampleRate |
int | audioBitrate |
int | audioChannels |
AudioCodecProfileType | audioCodecProfile |
VideoCodecProfileType | videoCodecProfile |
VideoCodecType | videoCodecType |
int | userCount |
int | backgroundColor |
String | userConfigExtraInfo |
String | metadata |
Static Public Attributes | |
static final String | LBHQ = "lbhq" |
A class for managing user-specific CDN live audio/video transcoding settings.
void io.agora.rtc.live.LiveTranscoding.addWatermark | ( | AgoraImage | watermark | ) |
Adds a watermark.
This method can add a watermark at a time. To add multiple watermarks, call this method multiple times.
The total number of watermarks and background images must be greater than or equal to 0 and less than or equal to 10.
watermark | The watermark on the live video. The format must be in the PNG format. See AgoraImage . |
boolean io.agora.rtc.live.LiveTranscoding.removeWatermark | ( | AgoraImage | watermark | ) |
Removes a watermark from the watermark list.
This method can remove a watermark at a time, so if you need to remove multiple watermarks, call this method multiple times.
watermark | The watermark on the live video. The format must be in the PNG format. See AgoraImage . |
ArrayList< AgoraImage > io.agora.rtc.live.LiveTranscoding.getWatermarkList | ( | ) |
Gets the list of watermarks.
void io.agora.rtc.live.LiveTranscoding.addBackgroundImage | ( | AgoraImage | backgroundImage | ) |
Add a background image.
This method can add a background image at a time, so if you need to add multiple background images, call this method multiple times.
The total number of watermarks and background images must be greater than or equal to 0 and less than or equal to 10.
backgroundImage | The background image on the live video. The format must be in the PNG format. See AgoraImage . |
boolean io.agora.rtc.live.LiveTranscoding.removeBackgroundImage | ( | AgoraImage | backgroundImage | ) |
Removes a background image from the background image list.
This method can remove a background image at a time, so if you need to remove multiple background images, call this method multiple times.
backgroundImage | The background image on the live video. The format must be in the PNG format. See AgoraImage . |
ArrayList< AgoraImage > io.agora.rtc.live.LiveTranscoding.getBackgroundImageList | ( | ) |
Gets the list of background images.
void io.agora.rtc.live.LiveTranscoding.setAdvancedFeatures | ( | String | featureName, |
Boolean | opened | ||
) |
Enables/Disables the advanced feature of the RTMP or RTMPS streaming with transcoding.
featureName | The name of the advanced feature to enable. You can set the name as LBHQ, which means the advanced feature for high-quality video with a lower bitrate. |
opened | Whether to enable the advanced feature:
|
Map< String, Boolean > io.agora.rtc.live.LiveTranscoding.getAdvancedFeatures | ( | ) |
Checks whether the advanced feature of the RTMP or RTMPS streaming with transcoding is enabled.
int io.agora.rtc.live.LiveTranscoding.addUser | ( | TranscodingUser | user | ) |
Adds a user displaying the video in CDN live.
user | transcodingUser . |
final ArrayList< TranscodingUser > io.agora.rtc.live.LiveTranscoding.getUsers | ( | ) |
Gets the user list in CDN live.
This method retrieves all users in CDN live. The user list returned by this method is read-only and should not be modified.
void io.agora.rtc.live.LiveTranscoding.setUsers | ( | ArrayList< TranscodingUser > | users | ) |
Sets the users in batches in CDN live.
This method sets all users involved in the CDN live stream. This method replaces the old user data with the new user data.
users | All users involved in CDN live. |
void io.agora.rtc.live.LiveTranscoding.setUsers | ( | Map< Integer, TranscodingUser > | users | ) |
Sets the users in batches in CDN live. This method sets all users involved in CDN live. This method replaces the old user data with the the new user data.
users | All users involved in CDN live. |
int io.agora.rtc.live.LiveTranscoding.removeUser | ( | int | uid | ) |
Removes a user from CDN live.
uid | User ID of the user to remove from CDN live. |
int io.agora.rtc.live.LiveTranscoding.getUserCount | ( | ) |
Gets the number of users transcoded in CDN live.
int io.agora.rtc.live.LiveTranscoding.getBackgroundColor | ( | ) |
Gets the background color in hex.
void io.agora.rtc.live.LiveTranscoding.setBackgroundColor | ( | int | color | ) |
Sets the background color of the CDN live stream in the format of RGB hex.
color | Background color to set in RGB hex value. Value only, do not include a #. For example, 0xFFB6C1 (light pink). The default value is 0x000000 (black). |
void io.agora.rtc.live.LiveTranscoding.setBackgroundColor | ( | int | red, |
int | green, | ||
int | blue | ||
) |
Sets the background color in RGB format.
red | Red component. |
green | Green component. |
blue | Blue component. |
int io.agora.rtc.live.LiveTranscoding.getRed | ( | ) |
int io.agora.rtc.live.LiveTranscoding.getGreen | ( | ) |
int io.agora.rtc.live.LiveTranscoding.getBlue | ( | ) |
void io.agora.rtc.live.LiveTranscoding.setRed | ( | int | red | ) |
void io.agora.rtc.live.LiveTranscoding.setGreen | ( | int | green | ) |
void io.agora.rtc.live.LiveTranscoding.setBlue | ( | int | blue | ) |
int io.agora.rtc.live.LiveTranscoding.width |
The width of the video in pixels. The default value is 360.
width
is [64,1920]. If the value is less than 64, Agora server automatically adjusts it to 64; if the value is greater than 1920, Agora server automatically adjusts it to 1920.width
and height
as 0. int io.agora.rtc.live.LiveTranscoding.height |
The height of the video in pixels. The default value is 640.
height
is [64,1080]. If the value is less than 64, Agora server automatically adjusts it to 64; if the value is greater than 1080, Agora server automatically adjusts it to 1080.width
and height
as 0. int io.agora.rtc.live.LiveTranscoding.videoBitrate |
The bitrate (Kbps) of the video. The default value is 400. Set this parameter according to the Video Bitrate Table
. If you set a bitrate beyond the proper range, the SDK automatically adapts it to a value within the range.
int io.agora.rtc.live.LiveTranscoding.videoFramerate |
The frame rate (fps) of the video. The value range is (0, 30]. The default value is 15. The Agora server adjusts any value over 30 to 30.
boolean io.agora.rtc.live.LiveTranscoding.lowLatency |
int io.agora.rtc.live.LiveTranscoding.videoGop |
Gop of the video frames in the CDN live stream. The default value is 30 fps.
AgoraImage io.agora.rtc.live.LiveTranscoding.watermark |
The watermark on the live video. The format must be in the PNG format. See AgoraImage
.
addWatermark
instead. AgoraImage io.agora.rtc.live.LiveTranscoding.backgroundImage |
The background image on the live video. The format must be in the PNG format. See AgoraImage
.
addBackgroundImage
instead. AudioSampleRateType io.agora.rtc.live.LiveTranscoding.audioSampleRate |
Self-defined audio-sample rate: AudioSampleRateType
.
int io.agora.rtc.live.LiveTranscoding.audioBitrate |
Bitrate (Kbps) of the CDN live audio output stream. The default value is 48 and the highest value is 128.
int io.agora.rtc.live.LiveTranscoding.audioChannels |
The number of audio channels for the CDN live stream. Agora recommends choosing 1 (mono), or 2 (stereo) audio channels. Special players are required if you choose 3, 4, or 5.
AudioCodecProfileType io.agora.rtc.live.LiveTranscoding.audioCodecProfile |
Audio codec profile type: AudioCodecProfileType
. Set it as LC-AAC or HE-AAC. The default value is LC-AAC.
VideoCodecProfileType io.agora.rtc.live.LiveTranscoding.videoCodecProfile |
Video codec profile type: VideoCodecProfileType
. Set it as BASELINE, MAIN, or HIGH (default). If you set this parameter to other values, Agora adjusts it to the default value HIGH.
VideoCodecType io.agora.rtc.live.LiveTranscoding.videoCodecType |
The video codec type of the output video stream. See VideoCodecType
.
int io.agora.rtc.live.LiveTranscoding.userCount |
Number of users in the live broadcast.
The value range is [0,17].
getUserCount
method. int io.agora.rtc.live.LiveTranscoding.backgroundColor |
The background color in RGB hex. Value only. Do not include a preceding #. For example, 0xFFB6C1 (light pink). The default value is 0x000000 (black).
setBackgroundColor
method to set the background color. String io.agora.rtc.live.LiveTranscoding.userConfigExtraInfo |
Reserved property. Extra user-defined information to send the Supplemental Enhancement Information (SEI) for the H.264/H.265 video stream to the CDN live client. Maximum length: 4096 Bytes. For more information on SEI frames, see SEI-related questions.
String io.agora.rtc.live.LiveTranscoding.metadata |
The metadata sent to the CDN live client.
|
static |
The advanced feature for high-quality video with a lower bitrate.