public class LiveTranscoding
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
LiveTranscoding.AudioCodecProfileType
Self-defined audio codec profile.
|
static class |
LiveTranscoding.AudioSampleRateType
Audio sample rate (Hz).
|
static class |
LiveTranscoding.TranscodingUser
The transcodingUser class which defines the video properties of the user displaying the video
in the CDN live.
|
static class |
LiveTranscoding.VideoCodecProfileType
Self-defined video codec profile.
|
static class |
LiveTranscoding.VideoCodecType
The video codec type of the output video stream.
|
Modifier and Type | Field and Description |
---|---|
int |
audioBitrate
Bitrate (Kbps) of the CDN live audio output stream.
|
int |
audioChannels
The number of audio channels for the CDN live stream.
|
LiveTranscoding.AudioCodecProfileType |
audioCodecProfile
Audio codec profile type:
AudioCodecProfileType . |
LiveTranscoding.AudioSampleRateType |
audioSampleRate
Self-defined audio-sample rate:
AudioSampleRateType . |
int |
backgroundColor
Deprecated.
This parameter is deprecated. We recommend using the
setBackgroundColor method to set the background
color. |
AgoraImage |
backgroundImage
Deprecated.
Deprecated from v4.0.0. Use
addBackgroundImage instead. |
int |
height
The height of the video in pixels.
|
boolean |
lowLatency
Deprecated.
Deprecated as of v2.8.0. Agora does not recommend using this parameter.
Latency mode:
|
java.lang.String |
metadata
Deprecated.
This parameter is deprecated.
|
java.lang.String |
userConfigExtraInfo
Reserved property.
|
int |
userCount
Deprecated.
This parameter is deprecated. We recommend using the
getUserCount method. |
int |
videoBitrate
The bitrate (Kbps) of the video.
|
LiveTranscoding.VideoCodecProfileType |
videoCodecProfile
Video codec profile type:
VideoCodecProfileType . |
LiveTranscoding.VideoCodecType |
videoCodecType
The video codec type of the output video stream.
|
int |
videoFramerate
The frame rate (fps) of the video.
|
int |
videoGop
Gop of the video frames in the CDN live stream.
|
AgoraImage |
watermark
Deprecated.
Deprecated from v4.0.0. Use
addWatermark instead. |
int |
width
The width of the video in pixels.
|
Constructor and Description |
---|
LiveTranscoding() |
Modifier and Type | Method and Description |
---|---|
void |
addBackgroundImage(AgoraImage backgroundImage)
add background image to backgroundImageList
|
int |
addUser(LiveTranscoding.TranscodingUser user)
Adds a user displaying the video in CDN live.
|
void |
addWatermark(AgoraImage watermark)
add watermark to list
|
java.util.Map<java.lang.String,java.lang.Boolean> |
getAdvancedFeatures()
Checks whether advanced features of the RTMP or RTMPS streaming with transcoding are enabled.
|
int |
getBackgroundColor()
Gets the background color in hex.
|
java.util.ArrayList<AgoraImage> |
getBackgroundImageList()
get object attribute of backgroundImageList
|
int |
getBlue()
Deprecated.
Gets the background color's blue component.
|
int |
getGreen()
Deprecated.
Gets the background color's green component.
|
int |
getRed()
Deprecated.
Gets the background color's red component.
|
int |
getUserCount()
Gets the number of users transcoded in CDN live.
|
java.util.ArrayList<LiveTranscoding.TranscodingUser> |
getUsers()
Gets the user list in CDN live.
|
java.util.ArrayList<AgoraImage> |
getWatermarkList()
get object attribute of watermarkList
|
boolean |
removeBackgroundImage(AgoraImage backgroundImage)
remove background from background image list
|
int |
removeUser(int uid)
Removes a user from CDN live.
|
boolean |
removeWatermark(AgoraImage watermark)
remove watermark from list
|
void |
setAdvancedFeatures(java.lang.String featureName,
java.lang.Boolean opened)
Enables/Disables advanced features of the RTMP or RTMPS streaming with transcoding.
|
void |
setBackgroundColor(int color)
Sets the background color of the CDN live stream in the format of RGB hex.
|
void |
setBackgroundColor(int red,
int green,
int blue)
Sets the background color in RGB format.
|
void |
setBlue(int blue)
Deprecated.
Sets the background color's blue component.
|
void |
setGreen(int green)
Deprecated.
Sets the background color's green component.
|
void |
setRed(int red)
Deprecated.
Sets the background color's red component.
|
void |
setUsers(java.util.ArrayList<LiveTranscoding.TranscodingUser> users)
Sets the users in batches in CDN live.
|
void |
setUsers(java.util.Map<java.lang.Integer,LiveTranscoding.TranscodingUser> users)
Sets the users in batches in CDN live.
|
public int width
public int height
public int videoBitrate
Video Bitrate Table
. If you set a
bitrate beyond the proper range, the SDK automatically adapts it to a value within the range.public int videoFramerate
@Deprecated public boolean lowLatency
public int videoGop
@Deprecated public AgoraImage watermark
addWatermark
instead.AgoraImage
.@Deprecated public AgoraImage backgroundImage
addBackgroundImage
instead.AgoraImage
.public LiveTranscoding.AudioSampleRateType audioSampleRate
AudioSampleRateType
.public int audioBitrate
public int audioChannels
public LiveTranscoding.AudioCodecProfileType audioCodecProfile
AudioCodecProfileType
. Set it as LC-AAC
or HE-AAC. The default value is LC-AAC.public LiveTranscoding.VideoCodecProfileType videoCodecProfile
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.public LiveTranscoding.VideoCodecType videoCodecType
VideoCodecType
.@Deprecated public int userCount
getUserCount
method.@Deprecated public int backgroundColor
setBackgroundColor
method to set the background
color.public java.lang.String userConfigExtraInfo
@Deprecated public java.lang.String metadata
public void addWatermark(AgoraImage watermark)
watermark
- you want to add watermark.public boolean removeWatermark(AgoraImage watermark)
watermark
- you want to remove object.public java.util.ArrayList<AgoraImage> getWatermarkList()
public void addBackgroundImage(AgoraImage backgroundImage)
backgroundImage
- you want to add background to list.public boolean removeBackgroundImage(AgoraImage backgroundImage)
backgroundImage
- you want to remove background imagepublic java.util.ArrayList<AgoraImage> getBackgroundImageList()
public void setAdvancedFeatures(java.lang.String featureName, java.lang.Boolean opened)
featureName
- The name of the advanced feature. It contains LBHQ and VEO.opened
- Whether to enable the advanced feature:
- `true`: Enable the advanced feature.
- `false`: (Default) Disable the advanced feature.public java.util.Map<java.lang.String,java.lang.Boolean> getAdvancedFeatures()
public int addUser(LiveTranscoding.TranscodingUser user)
user
- transcodingUser
.public final java.util.ArrayList<LiveTranscoding.TranscodingUser> getUsers()
public void setUsers(java.util.ArrayList<LiveTranscoding.TranscodingUser> users)
users
- All users involved in CDN live.public void setUsers(java.util.Map<java.lang.Integer,LiveTranscoding.TranscodingUser> users)
users
- All users involved in CDN live.public int removeUser(int uid)
uid
- User ID of the user to remove from CDN live.public int getUserCount()
public int getBackgroundColor()
public void setBackgroundColor(int color)
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).public void setBackgroundColor(int red, int green, int blue)
red
- Red component.green
- Green component.blue
- Blue component.@Deprecated public int getRed()
@Deprecated public int getGreen()
@Deprecated public int getBlue()
@Deprecated public void setRed(int red)
@Deprecated public void setGreen(int green)
@Deprecated public void setBlue(int blue)