我正在尝试对 WMA10 文件进行编码,但需要设置 VBR 质量。
private void Encode()
{
MediaItem mediaItem;
mediaItem = new MediaItem(this.fileNameToEncode);
using (Job job = new Job())
{
WmaAudioProfile wmaProfile = new WmaAudioProfile();
wmaProfile.BitsPerSample = 24;
wmaProfile.Channels = 2;
wmaProfile.Codec = AudioCodec.WmaProfessional;
wmaProfile.SamplesPerSecond = 44100;
VariableQualityBitrate vbrQuality = new VariableQualityBitrate(98);
wmaProfile.Bitrate = vbrQuality;
//Now that I have my profile setup
//how can I use it?
job.MediaItems.Add(mediaItem);
job.OutputDirectory = @"D:\temp\";
job.Encode();
}
}
我不明白如何将AudioProfile实际应用于Job。