|
Agora Java API Reference for Android
|
Transcoding configurations for Media Push. More...
Classes | |
| enum | AudioCodecProfileType |
| Self-defined audio codec profile. More... | |
| enum | AudioSampleRateType |
| class | TranscodingUser |
| Transcoding configurations of each host. More... | |
| enum | VideoCodecProfileType |
| Video codec profile types. More... | |
| enum | VideoCodecType |
| The codec type of the output video. More... | |
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 |
| AudioSampleRateType | audioSampleRate |
| int | audioBitrate |
| int | audioChannels |
| AudioCodecProfileType | audioCodecProfile |
| VideoCodecProfileType | videoCodecProfile |
| VideoCodecType | videoCodecType |
| int | userCount |
| int | backgroundColor |
| String | userConfigExtraInfo |
| String | metadata |
Transcoding configurations for Media Push.
| void io.agora.rtc2.live.LiveTranscoding.addWatermark | ( | AgoraImage | watermark | ) |
add watermark to list
| watermark | you want to add watermark. |
| boolean io.agora.rtc2.live.LiveTranscoding.removeWatermark | ( | AgoraImage | watermark | ) |
remove watermark from list
| watermark | you want to remove object. |
| ArrayList<AgoraImage> io.agora.rtc2.live.LiveTranscoding.getWatermarkList | ( | ) |
get object attribute of watermarkList
| void io.agora.rtc2.live.LiveTranscoding.addBackgroundImage | ( | AgoraImage | backgroundImage | ) |
add background image to backgroundImageList
| backgroundImage | you want to add background to list. |
| boolean io.agora.rtc2.live.LiveTranscoding.removeBackgroundImage | ( | AgoraImage | backgroundImage | ) |
remove background from background image list
| backgroundImage | you want to remove background image |
| ArrayList<AgoraImage> io.agora.rtc2.live.LiveTranscoding.getBackgroundImageList | ( | ) |
get object attribute of backgroundImageList
| void io.agora.rtc2.live.LiveTranscoding.setAdvancedFeatures | ( | String | featureName, |
| Boolean | opened | ||
| ) |
Enables/Disables advanced features of the RTMP or RTMPS streaming with transcoding.
| featureName | The name of the advanced feature. It contains LBHQ and VEO. |
| opened | Whether to enable the advanced feature:
|
| Map<String, Boolean> io.agora.rtc2.live.LiveTranscoding.getAdvancedFeatures | ( | ) |
Checks whether advanced features of the RTMP or RTMPS streaming with transcoding are enabled.
| int io.agora.rtc2.live.LiveTranscoding.addUser | ( | TranscodingUser | user | ) |
Adds a user displaying the video in CDN live.
| user | transcodingUser. |
| final ArrayList<TranscodingUser> io.agora.rtc2.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.rtc2.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.rtc2.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.rtc2.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.rtc2.live.LiveTranscoding.getUserCount | ( | ) |
Gets the number of users transcoded in CDN live.
| int io.agora.rtc2.live.LiveTranscoding.getBackgroundColor | ( | ) |
Gets the background color in hex.
| void io.agora.rtc2.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.rtc2.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.rtc2.live.LiveTranscoding.getRed | ( | ) |
| int io.agora.rtc2.live.LiveTranscoding.getGreen | ( | ) |
| int io.agora.rtc2.live.LiveTranscoding.getBlue | ( | ) |
| void io.agora.rtc2.live.LiveTranscoding.setRed | ( | int | red | ) |
| void io.agora.rtc2.live.LiveTranscoding.setGreen | ( | int | green | ) |
| void io.agora.rtc2.live.LiveTranscoding.setBlue | ( | int | blue | ) |
| int io.agora.rtc2.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.rtc2.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.rtc2.live.LiveTranscoding.videoBitrate |
The encoding bitrate (Kbps) of the video. This parameter does not need to be set; keeping the default value STANDARD_BITRATE is sufficient. The SDK automatically matches the most suitable bitrate based on the video resolution and frame rate you have set. For the correspondence between video resolution and frame rate, see Video profile.
| int io.agora.rtc2.live.LiveTranscoding.videoFramerate |
Frame rate (fps) of the output video stream set for Media Push. The default value is 15. The value range is (0,30].
| boolean io.agora.rtc2.live.LiveTranscoding.lowLatency |
Latency mode:
true: Low latency with unassured quality.false: (Default) High latency with assured quality.
| int io.agora.rtc2.live.LiveTranscoding.videoGop |
GOP (Group of Pictures) in fps of the video frames for Media Push. The default value is 30.
| AudioSampleRateType io.agora.rtc2.live.LiveTranscoding.audioSampleRate |
The audio sampling rate (Hz) of the output media stream. See AudioSampleRateType.
| int io.agora.rtc2.live.LiveTranscoding.audioBitrate |
Bitrate (Kbps) of the audio output stream for Media Push. The default value is 48, and the highest value is 128.
| int io.agora.rtc2.live.LiveTranscoding.audioChannels |
The number of audio channels for Media Push. Agora recommends choosing 1 (mono), or 2 (stereo) audio channels. Special players are required if you choose 3, 4, or 5.
| AudioCodecProfileType io.agora.rtc2.live.LiveTranscoding.audioCodecProfile |
Audio codec profile type for Media Push. See AudioCodecProfileType.
| VideoCodecProfileType io.agora.rtc2.live.LiveTranscoding.videoCodecProfile |
Video codec profile type for Media Push. Set it as 66, 77, or 100 (default). See VideoCodecProfileType for details.
| VideoCodecType io.agora.rtc2.live.LiveTranscoding.videoCodecType |
Video codec profile types for Media Push. See VideoCodecType.
| int io.agora.rtc2.live.LiveTranscoding.userCount |
Obsolete and not recommended for use. Use getUserCount instead. The number of users in the Media Push. The value range is [0,17].
| int io.agora.rtc2.live.LiveTranscoding.backgroundColor |
Obsolete and not recommended for use. Use setBackgroundColor [1/2] instead.
| String io.agora.rtc2.live.LiveTranscoding.userConfigExtraInfo |
Reserved property. Extra user-defined information to send SEI for the H.264/H.265 video stream to the CDN live client. Maximum length: 4096 bytes. For more information on SEI, see SEI-related questions.
| String io.agora.rtc2.live.LiveTranscoding.metadata |
Obsolete and not recommended for use. The metadata sent to the CDN client.
1.8.18