LiveTranscoding
- HarmonyOS
更新时间不可用
旁路推流的转码属性。
export class LiveTranscoding {
public width: number;
public height: number;
public videoBitrate: number;
public videoFramerate: number;
public videoGop: number;
public watermarkList?: Array<AgoraImage>;
public backgroundImageList?: Array<AgoraImage>;
public audioSampleRate: Constants.AudioSampleRateType;
public audioBitrate: number;
public audioChannels: number;
public audioCodecProfile: Constants.AudioCodecProfileType;
public videoCodecProfile: Constants.VideoCodecProfileType;
public videoCodecType: Constants.VideoCodecType;
public userConfigExtraInfo?: string;
public transcodingUsers: Map<number, TranscodingUser>;
public advancedFeatures: Map<string, boolean>;
constructor() {
this.width = 360;
this.height = 640;
this.videoBitrate = 400;
this.videoCodecProfile = Constants.VideoCodecProfileType.HIGH;
this.videoCodecType = Constants.VideoCodecType.H264;
this.videoGop = 30;
this.videoFramerate = 15;
this.audioSampleRate = Constants.AudioSampleRateType.TYPE_44100;
this.audioBitrate = 48;
this.audioChannels = 1;
this.audioCodecProfile = Constants.AudioCodecProfileType.LC_AAC;
this.advancedFeatures = new Map<string, boolean>();
this.transcodingUsers = new Map<number, TranscodingUser>();
}
}| 参数名 | 描述 |
|---|---|
width | |
height | |
videoBitrate | 视频编码码率,单位为 Kbps。该参数无需设置,保留默认值 STANDARD_BITRATE 即可,SDK 会根据你设定的视频分辨率和帧率自动匹配最合适的码率。有关视频分辨率和帧率的对应关系,详见视频属性。 |
videoFrameRate | |
videoGop | |
videoCodecProfile | |
videoCodecType | 用于旁路直播的输出视频的编解码类型。详见 VideoCodecType。 |
transcodingUsers | 用于管理参与旁路直播的视频转码合图的用户。最多支持 17 人同时参与转码合图。详见 TranscodingUser。 |
userConfigExtraInfo | 预留参数:用户自定义的发送到旁路推流客户端的信息,用于填充 H264/H265 视频中 SEI 帧内容。长度限制:4096 字节。关于 SEI 的详细信息,详见 SEI 帧相关问题。 |
audioSampleRate | 用于旁路推流的输出媒体流的音频采样率 (Hz),详见 AudioSampleRateType。 |
audioBitrate | |
audioChannels | |
audioCodecProfile | 用于旁路直播输出音频的编码规格。详见 AudioCodecProfileType。 |