TRTCTranscodingConfig class

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".
getter/setter pair
audioBitrate int
Field description: audio bitrate after transcoding. Recommended value: default value: 64 Kbps. Value range: 32,192.
getter/setter pair
audioChannels int
Field description: number of sound channels after transcoding. Recommended value: default value: 1. Valid values: 1, 2.
getter/setter pair
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.
getter/setter pair
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)
getter/setter pair
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 as backgroundImage.
For example, if the "image ID" is 63, you can set backgroundImage = "63";
getter/setter pair
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".
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
mixUsers List<TRTCMixUser>?
Field description: position information of each channel of subimage
getter/setter pair
mode int
Field description: transcoding configuration mode
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
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.
getter/setter pair
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 and videoHeight. You can also refer to the comment on the enumeration definition of TRTC_VIDEO_RESOLUTION_640_480.
getter/setter pair
videoFramerate int
Field description: frame rate of video resolution in fps after transcoding. Recommended value: default value: 15 fps. Value range: (0,30].
getter/setter pair
videoGOP int
Field description: keyframe interval (GOP) of video resolution after transcoding. Recommended value: default value: 2 (in seconds). Value range: 1,8.
getter/setter pair
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.
getter/setter pair
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.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent 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