TRTCTranscodingConfig class Null safety
On-Cloud MixTranscoding configuration
This contains the final encoding quality and the positions of images of each channel.
Constructors
-
TRTCTranscodingConfig({int? appId, int? bizId, int mode = TRTCCloudDef.TRTC_TranscodingConfigMode_Unknown, int videoWidth = 0, int videoHeight = 0, int videoBitrate = 0, int videoFramerate = 15, int videoGOP = 2, int backgroundColor = 0x000000, String? backgroundImage, int audioSampleRate = 48000, int audioBitrate = 64, int audioChannels = 1, List<
TRTCMixUser> ? mixUsers, String? streamId})
Properties
- appId ↔ int?
-
Field description: Tencent Cloud CSS
AppID
Recommended value: please select a created application in the TRTC console, click Application Info, and get it in "Relayed Live Streaming Info".read / write - audioBitrate ↔ int
-
Field description: audio bitrate after transcoding.
Recommended value: default value: 64 Kbps. Value range:
32,192
.read / write - audioChannels ↔ int
-
Field description: number of sound channels after transcoding.
Recommended value: default value: 1. Valid values: 1, 2.
read / write
- audioSampleRate ↔ int
-
Field description: audio sample rate after transcoding.
Recommended value: default value: 48000 Hz. Valid values: 12000 Hz, 16000 Hz, 22050 Hz, 24000 Hz, 32000 Hz, 44100 Hz, 48000 Hz.
read / write
- backgroundColor ↔ int
-
Field description: background color of the mixed video image. The default value is black, and the format is hex number; for example: "0x61B9F1" represents the RGB color (97,158,241).
Recommended value: default value: 0x000000 (black)
read / write
- backgroundImage ↔ String?
-
Field description: background image of the mixed video image.
Recommended value: default value: null, indicating not to set the background image
Note: you need to upload the background image in "Application Management" > "Function Configuration" > "Material Management" in the console in advance.
After the upload is successful, you can get the corresponding "image ID". Then, you need to convert it into a string and set it asbackgroundImage
.
For example, if the "image ID" is 63, you can setbackgroundImage = "63"
;
read / write - bizId ↔ int?
-
Field description: Tencent Cloud CSS
bizid
Recommended value: please select a created application in the TRTC console, click Application Info, and get it in "Relayed Live Streaming Info".read / write - hashCode → int
-
The hash code for this object. [...]
read-only, inherited
-
mixUsers
↔ List<
TRTCMixUser> ? -
Field description: position information of each channel of subimage
read / write
- mode ↔ int
-
Field description: transcoding configuration mode
read / write
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
- streamId ↔ String?
-
Field description: ID of the live stream output to CDN
If this parameter is not set, the SDK will execute the default logic, that is, it will mix the multiple streams in the room into the video stream of the caller of the API, i.e., A + B => A;
If this parameter is set, the SDK will mix the multiple streams in the room into the live stream ID you specify, i.e., A + B => C.
Recommended value: default value: null, that is, the multiple streams in the room will be mixed into the video stream of the caller of this API.
read / write
- videoBitrate ↔ int
-
Field description: bitrate of video resolution in Kbps after transcoding.
Recommended value: if you enter 0, the backend will estimate the bitrate based on
videoWidth
andvideoHeight
. You can also refer to the comment on the enumeration definition ofTRTC_VIDEO_RESOLUTION_640_480
.read / write - videoFramerate ↔ int
-
Field description: frame rate of video resolution in fps after transcoding.
Recommended value: default value: 15 fps. Value range: (0,30].
read / write
- videoGOP ↔ int
-
Field description: keyframe interval (GOP) of video resolution after transcoding.
Recommended value: default value: 2 (in seconds). Value range:
1,8
.read / write - videoHeight ↔ int
-
Field description: height of video resolution after transcoding.
Recommended value: 640 px. If you are pushing a pure audio stream, please set width x height to 0 px x 0 px; otherwise, a video stream with a canvas background will be carried after mixtranscoding.
read / write
- videoWidth ↔ int
-
Field description: width of video resolution after transcoding.
Recommended value: 360 px. If you are pushing a pure audio stream, please set width x height to 0 px x 0 px; otherwise, a video stream with a canvas background will be carried after mixtranscoding.
read / write
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object. [...]
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator. [...]
inherited