I want to convert a WAV file into a M4A file.
我想把WAV文件转换成M4A文件。
I could not find any reference or any example of how to achieve that. Naudio should do the trick i assume, but i havent figured out how to do this yet.
我找不到任何关于如何实现这一目标的参考或例子。Naudio应该做这个技巧,我想,但是我还没想好怎么做。
I am writing a WebAPI2 project, and i need to return an m4a audio file to the user upon request. Been using a PushStreamContent in order to provide the user with the file, but using an MP3 as the conversion target, lead to many difficulties with browser support and Seek/Pause/Stop support.
我正在编写一个WebAPI2项目,我需要根据用户的要求返回一个m4a音频文件。使用PushStreamContent是为了向用户提供文件,但是使用MP3作为转换目标,导致浏览器支持和查找/暂停/停止支持有很多困难。
Thanks in advance,
Nokky.
谢谢你提前,Nokky。
1 个解决方案
#1
2
M4A files simply contain AAC encoded audio. Have a look at the Media Foundation Encoder demo in the NAudio WPF demo application to see an example of using MediaFoundationEncoder
to create AAC files. It will let you encode as aac if you have an appropriate Media Foundation Codec on your machine (you should have with Win 7 and above, although note that it doesn't do low bitrates).
M4A文件仅仅包含AAC编码的音频。查看NAudio WPF演示应用程序中的MediaFoundation编码器演示,了解使用MediaFoundationEncoder创建AAC文件的示例。如果您的机器上有一个合适的媒体基础编解码器,它将允许您以aac的形式进行编码(您应该拥有Win 7及以上版本,尽管要注意它不支持低比特率)。
#1
2
M4A files simply contain AAC encoded audio. Have a look at the Media Foundation Encoder demo in the NAudio WPF demo application to see an example of using MediaFoundationEncoder
to create AAC files. It will let you encode as aac if you have an appropriate Media Foundation Codec on your machine (you should have with Win 7 and above, although note that it doesn't do low bitrates).
M4A文件仅仅包含AAC编码的音频。查看NAudio WPF演示应用程序中的MediaFoundation编码器演示,了解使用MediaFoundationEncoder创建AAC文件的示例。如果您的机器上有一个合适的媒体基础编解码器,它将允许您以aac的形式进行编码(您应该拥有Win 7及以上版本,尽管要注意它不支持低比特率)。