Struct TRTCTranscodingConfig
5.12 On-Cloud MixTranscoding parameters
The parameters determine the quality of encoded audio/video, the position of each image, etc.
Inherited Members
Namespace: trtc
Assembly: cs.temp.dll.dll
Syntax
public struct TRTCTranscodingConfig
Fields
appId
Declaration
public UInt32 appId
Field Value
| Type | Description |
|---|---|
| UInt32 |
audioBitrate
Description: bitrate (Kbps) of transcoded audio
Value: default value: 64. Value range: [32,192]
Declaration
public UInt32 audioBitrate
Field Value
| Type | Description |
|---|---|
| UInt32 |
audioChannels
Description: number of sound channels of transcoded audio
Value: Valid values: 1 (default), 2
Declaration
public UInt32 audioChannels
Field Value
| Type | Description |
|---|---|
| UInt32 |
audioSampleRate
Description: sample rate (Hz) of transcoded audio
Value: Valid values: 12000, 16000, 22050, 24000, 32000, 44100, 48000 (default)
Declaration
public UInt32 audioSampleRate
Field Value
| Type | Description |
|---|---|
| UInt32 |
backgroundColor
Description: background color of the mixing result. The default color is black, and the value is a hex number. For example: 0x61B9F1 represents the RGB color (97,158,241).
Value: default value: 0x000000 (black)
Declaration
public UInt32 backgroundColor
Field Value
| Type | Description |
|---|---|
| UInt32 |
backgroundImage
Description: background image of the mixing result
Value: default value: null, which means that no background images are set
Note: you need to first upload the image in Application Management > Function Configuration > Material Management in the console.
You will get an image ID for the image uploaded, which you need to convert to a string before using it as the value of backgroundImage.
For example, if the image ID is 63, you should set backgroundImage to 63.
Declaration
public string backgroundImage
Field Value
| Type | Description |
|---|---|
| System.String |
bizId
Description: Tencent Cloud bizid
Value: In the TRTC console, find the application created, and click Application Info to view the bizid in the Relayed Live Streaming Info section.
Declaration
public UInt32 bizId
Field Value
| Type | Description |
|---|---|
| UInt32 |
mixUsersArray
Description: position of each image
Declaration
public TRTCMixUser[] mixUsersArray
Field Value
| Type | Description |
|---|---|
| TRTCMixUser[] |
mixUsersArraySize
Description: number of elements in mixUsersArray
Declaration
public UInt32 mixUsersArraySize
Field Value
| Type | Description |
|---|---|
| UInt32 |
mode
Description: On-Cloud MixTranscoding configuration mode
Declaration
public TRTCTranscodingConfigMode mode
Field Value
| Type | Description |
|---|---|
| TRTCTranscodingConfigMode |
streamId
Description: ID of the live stream relayed to CDN
If you do not set this parameter, the SDK will execute the default logic, that is, it will mix multiple streams in the room into the video stream of the API caller, i.e., A + B => A.
If you set this parameter, the SDK will mix multiple streams in the room into a stream whose ID you specify, i.e., A + B => C.
Value: default value: null, which indicates that multiple streams in the room are mixed into the video stream of the API caller
Declaration
public string streamId
Field Value
| Type | Description |
|---|---|
| System.String |
videoBitrate
Description: bitrate (Kbps) of transcoded video
Value: If you set this parameter to 0, the backend will work out a bitrate based on videoWidth and videoHeight. You can refer to the comment for the enumerated value TRTCVideoResolution_640_480.
Declaration
public UInt32 videoBitrate
Field Value
| Type | Description |
|---|---|
| UInt32 |
videoFramerate
Description: frame rate (fps) of transcoded video
Value: default value: 15. Value range: (0,30]
Declaration
public UInt32 videoFramerate
Field Value
| Type | Description |
|---|---|
| UInt32 |
videoGOP
Description: keyframe interval (GOP) of transcoded video in seconds
Value: default value: 2. Value range: [1,8]
Declaration
public UInt32 videoGOP
Field Value
| Type | Description |
|---|---|
| UInt32 |
videoHeight
Description: height (px) of transcoded video
Value: recommended value: 640. If audio-only streams are mixed, the mixing result will carry a video stream that shows a canvas background. To avoid this, set both the width and height to 0 px.
Declaration
public UInt32 videoHeight
Field Value
| Type | Description |
|---|---|
| UInt32 |
videoWidth
Description: width (px) of transcoded video
Value: recommended value: 360. If audio-only streams are mixed, the mixing result will carry a video stream that shows a canvas background. To avoid this, set both the width and height to 0 px.
Declaration
public UInt32 videoWidth
Field Value
| Type | Description |
|---|---|
| UInt32 |