Constructor
new TRTCTranscodingConfig(mode, appId, bizId, videoWidth, videoHeight, videoBitrate, videoFramerate, videoGOP, backgroundColor, backgroundImage, audioSampleRate, audioBitrate, audioChannels, mixUsersArray, streamId)
These parameters are used to specify the layout position information of each video image and the encoding parameters of mixtranscoding during On-Cloud MixTranscoding.
Parameters:
Name | Type | Description |
---|---|---|
mode |
TRTCTranscodingConfigMode |
required
[Field description] layout mode. please choose a value according to your business needs. The preset mode has better applicability. |
appId |
Number |
required
[Field description] |
bizId |
Number |
required
[Field description] |
videoWidth |
Number |
required
[Field description] specify the target resolution (width) of On-Cloud MixTranscoding |
videoHeight |
Number |
required
[Field description] specify the target video frame rate (fps) of On-Cloud MixTranscoding |
videoBitrate |
Number |
required
[Field description] specify the target video bitrate (Kbps) of On-Cloud MixTranscoding
[Recommended value] if you enter 0, TRTC will estimate a reasonable bitrate value based on |
videoFramerate |
Number |
required
[Field description] specify the target video frame rate (fps) of On-Cloud MixTranscoding |
videoGOP |
Number |
required
[Field description] specify the target video keyframe interval (GOP) of On-Cloud MixTranscoding |
backgroundColor |
Number |
required
[Field description] specify the background color of the mixed video image. |
backgroundImage |
String |
required
[Field description] specify the background image of the mixed video image. |
audioSampleRate |
Number |
required
[Field description] specify the target audio sample rate of On-Cloud MixTranscoding |
audioBitrate |
Number |
required
[Field description] specify the target audio bitrate of On-Cloud MixTranscoding |
audioChannels |
Number |
required
[Field description] specify the number of sound channels of On-Cloud MixTranscoding |
mixUsersArray |
Array.<TRTCMixUser> |
required
[Field description] specify the position, size, layer, and stream type of each video image in On-Cloud MixTranscoding |
streamId |
String |
required
[Field description] ID of the live stream output to CDN |