EE3 SDK指定音频配置文件 [英] EE3 SDK Specify an audio profile
问题描述
我无法为实时编码会话自定义音频配置文件。这是我的代码片段。如何使用WM9编码器枚举视频和音频配置文件? I can't seem to customize the audio profile for a live encoding session. Here's a snippet of my code. How can I enumerate the video and audio profiles like I could with the WM9 encoder? Dim vidProfile As 新 MainVC1VideoProfile vidProfile.Bitrate = Dim vidProfile As New MainVC1VideoProfile
vidProfile.Bitrate = 新 ConstantBitrate(100) vidProfile.Complexity = VideoComplexity.Best New ConstantBitrate(100)
vidProfile.Complexity = VideoComplexity.Best vidProfile.Size = vidProfile.Size = 新 System.Drawing.Size(320,240) New System.Drawing.Size(320, 240)
Dim audProfile < span style ="color:#0000ff; font-size:x-small"> 作为 audProfile.Bitrate = Dim audProfile As New WmaAudioProfile
audProfile.Bitrate = 新 ConstantBitrate(20) audProfile.Channels = 2 New ConstantBitrate(20)
audProfile.Channels = 2 audProfile.Codec = AudioCodec.Wma audProfile.Codec = AudioCodec.Wma '将输出设置为广播并设置端口 Dim 输出 作为 新 WindowsMediaBroadcastOutputFormat output.BroadcastPort = 8082 Dim output As New WindowsMediaBroadcastOutputFormat
output.BroadcastPort = 8082 output.VideoProfile = vidProfile output.VideoProfile = vidProfile output.AudioProfile = audProfile output.AudioProfile = audProfile job.OutputFormat = output job.OutputFormat = output job.StartEncoding() job.StartEncoding()
Hope that helps. 这篇关于EE3 SDK指定音频配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
推荐答案
视频配置文件几乎可以使用您选择的任何设置。音频配置文件需要匹配系统中找到的一个。你可以列举代码如下的那些。
The video profiles can use pretty much whatever settings you choose. The audio profiles need to match one of the ones found on the system. You can enumerate those with code something like the following.
foreach (AudioProfile audioProfile in
LocalProfiles.AudioProfiles)
{
// Code to look at each audioProfile
// to decide which one you want.
...
}
希望有所帮助。
问候院长。
Regards
Dean.