简体   繁体   English

如何使用NAudio将音频文件转换为320kbps的.M4A?

[英]How do I convert audio file to .M4A with 320kbps with NAudio?

When I try to convert audio file to .m4a with this code 当我尝试使用此代码将音频文件转换为.m4a时

using (var reader = new MediaFoundationReader(input))
    //encoder.Encode(output, reader);
    MediaFoundationEncoder.EncodeToAac(reader, output, 320000);

It always returns a file with bitrate of 192/195kbs. 它始终返回比特率为192 / 195kbs的文件。 Even this code 甚至这段代码

var bit = MediaFoundationEncoder.GetEncodeBitrates(AudioSubtypes.MFAudioFormat_AAC, 44100, 2);

returns bitrates up to 192000. 返回最高达192000的比特率。

How do I encode it to 320000kbps instead? 如何将其编码为320000kbps?

With MediaFoundationEncoder you can only encode at the bitrates that media foundation offers. 使用MediaFoundationEncoder您只能以Media Foundation提供的比特率进行编码。 You'll need to find an alternative encoding tool for other bitrates 您需要找到其他比特率的替代编码工具

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM