LiveTranscoding class

管理 CDN 直播推流转码的接口。

Annotations

Constructors

LiveTranscoding(List<TranscodingUser> transcodingUsers, {int width, int height, int videoBitrate, VideoFrameRate videoFramerate, bool lowLatency, int videoGop, AgoraImage watermark, AgoraImage backgroundImage, AudioSampleRateType audioSampleRate, int audioBitrate, AudioChannel audioChannels, AudioCodecProfileType audioCodecProfile, VideoCodecProfileType videoCodecProfile, Color backgroundColor, String userConfigExtraInfo})
Constructs a LiveTranscoding
LiveTranscoding.fromJson(Map<String, dynamic> json)
factory

Properties

audioBitrate ↔ int
用于旁路推流的输出音频的码率。单位为 Kbps,默认值为 48,最大值为 128。
@JsonKey(includeIfNull: false), read / write
audioChannels ↔ AudioChannel
用于旁路推流的输出音频的声道数,取值范围为 1,5 中的整型,默认值为 1。建议取 1 或 2,如果取值为 3、4或5,需要特殊播放器支持: [...]
@JsonKey(includeIfNull: false), read / write
audioCodecProfile ↔ AudioCodecProfileType
用于旁路推流的输出音频的编码规格。详见 AudioCodecProfileType。 可以设置为 LCAAC 或 HEAAC。默认为 LCAAC。
@JsonKey(includeIfNull: false), read / write
audioSampleRate ↔ AudioSampleRateType
自定义音频采样率。详见 AudioSampleRateType。
@JsonKey(includeIfNull: false), read / write
backgroundColor ↔ Color
背景色,格式为 RGB 定义下的 Hex 值,不要带 # 号,如 0xFFB6C1 表示浅粉色。默认0x000000,黑色。// RN 优化 详见 Color。
@JsonKey(includeIfNull: false), read / write
backgroundImage ↔ AgoraImage
用于旁路直播的输出视频上的背景图片。添加后所有旁路直播的观众都可以看到背景图片。 详见 AgoraImage。
@JsonKey(includeIfNull: false), read / write
hashCode → int
The hash code for this object. [...]
read-only, inherited
height ↔ int
推流视频的总高度,默认值 640,单位为像素。 [...]
@JsonKey(includeIfNull: false), read / write
lowLatency ↔ bool
Deprecated 已废弃。Agora 不推荐使用。 [...]
@JsonKey(includeIfNull: false), read / write
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited
transcodingUsers → List<TranscodingUser>
用于管理参与直播推流的视频转码合图的用户。最多支持 17 人同时参与转码合图。
final
userConfigExtraInfo ↔ String
预留参数。 用户自定义的发送到旁路推流客户端的信息,用于填充 H264/H265 视频中 SEI 帧内容。长度限制:4096字节。
@JsonKey(includeIfNull: false), read / write
videoBitrate ↔ int
用于旁路推流的输出视频的码率。 单位为 Kbps。 400 Kbps 为默认值。用户可以根据 VideoEncoderConfiguration.bitrate(码率参考表)参考表中的码率值进行设置;
@JsonKey(includeIfNull: false), read / write
videoCodecProfile ↔ VideoCodecProfileType
用于旁路直播的输出视频的编码规格。详见 VideoCodecProfileType。 可以设置为 BASELINE、MAIN 或 HIGH (默认值)级别。如果设置其他值,Agora 服务器会统一设为默认值 HIGH。
@JsonKey(includeIfNull: false), read / write
videoFramerate ↔ VideoFrameRate
用于旁路推流的输出视频的帧率。取值范围是 (0,30],单位为 fps。默认值为 15 fps。
@JsonKey(includeIfNull: false), read / write
videoGop ↔ int
用于旁路直播的输出视频的 GOP。单位为帧。默认值为 30 fps。
@JsonKey(includeIfNull: false), read / write
watermark ↔ AgoraImage
用于旁路直播的输出视频上的水印图片。添加后所有旁路直播的观众都可以看到水印。必须为 PNG 格式。 详见 AgoraImage。
@JsonKey(includeIfNull: false), read / write
width ↔ int
推流视频的总宽度,默认值 360,单位为像素。 [...]
@JsonKey(includeIfNull: false), read / write

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toJson() → Map<String, dynamic>
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator. [...]
inherited