是否有普遍的音频文件解码一个.NET库?音频文件、普遍、NET

2023-09-03 06:46:04 作者:被叫过女汉子的人别躲了

你知道任何.NET库,可以去code几种类型的音频文件?理想情况下,它应该是平台无关的,所以它可以与.NET和Mono使用 - 在Windows和* NIX

Do you know of any .NET library which can decode several types of audio files? Ideally, it should be platform agnostic, so it can be used with .NET and Mono - on Windows and *NIX.

我已经折磨谷歌搜索这符合我的需要的库,但不幸的是我无法找到任何东西。所以写了很多包装类的GStreamer和朋友的面前,我想我可以在这里问。 :)

I already tortured Google searching for a library which meets my needs, but unfortunately I could not find anything. So before writing a lot of wrapper classes for GStreamer and friends, I thought I could ask here. :)

支持的音频文件应该是(至少)

Supported audio files should be (at least)

MP3, 的Ogg Vorbis和 FLAC(可选)。

当我需要这个应用程序只是为了好玩,图书馆应该是开源的 - 或者至少是免费的。此外,向用户显示一个唠叨的屏幕很可能是坏的或不切实际的,因为我打算把这个变成一个服务进程。

As the application I would need this for is just for fun, the library should be open source - or at least free. Also, a nag screen displayed to a user would probably be bad or impractical, because I am planning on putting this into a service process.

我需要使用这个库/这些库,以便解码音频文件,并通过一个byte []我libOFA的包装,这样我就可以产生MusicDNS指纹了。我的实验性应用将基于Linux的服务器最有可能的运行。

I would need use this library/these libraries in order to decoding audio files and passing a byte[] to my libOFA wrapper, so that I can produce a MusicDNS fingerprint for it. My experimental application would most likely run on a Linux based server.

推荐答案

还有就是的ffmpeg 库和实用程序可以转换的音频和视频格式。然后,夫妇与 FFmpeg.NET 库,你可以做的编码/ .NET中的解码。支持所有你所提到的格式。

There is the ffmpeg library and utilities that converts audio and video formats. Then, couple with the FFmpeg.NET library, you can do the encoding/decoding in .NET. All the formats you mentioned are supported.