开发者

Which Audio Codec should I use?

Which audio codec should I choose for my C# software development project where the raw audio to be transcoded/transported/used is based on the following:

  1. For encoding Speech only
  2. Audio can be stereo or mono
  3. Able to support live streaming
  4. Good tradeoff between file size and quality
  5. To be transported over TCP/IP in its encoded form
  6. Can be played back by a readily available free player without further processing

Note that whether there is a read开发者_StackOverflowily available free codec library for performing transcoding does not need to be taken into consideration.


A more recent and better alternative would be the Opus Codec.

Check out the comparison with other codecs to see how well it performs.


Speex is free open-source codec, designed for encoding speech in realtime solutions that need low latency. General-purpose compression schemes such as WMA or MP3 are likely to cause more delay and they also may not be able to operate well at very low bitrates. http://www.speex.org/


You could use LAME for MP3 encoding with the 'voice' presets. I would recommend testing different ones though, because of issues like this.

MP3 is what KPFA.org (and now KQED, I think) both use for live streaming. Works great. Don't know what server sw is used though.


Given your choice of Language, if it is safe to assume that you are using Windows, I would actually recommend WMA, the Windows Format. The libraries are all going to be built in, and, all things considered, is a very solid codec. Supports all your requirements and more.

However, if you're going to be pushing to a flash endpoint, use .fla, Flash Audio. Flash definitely optimizes for consuming this and, while it's not quite as easy to use with C#, you'll definitely appreciate the ease of consumption on the other end.


If you're only targeting Windows, GSM codec is probably a good choice for low bandwidth applications. It is generally considered to be lower quality than Speex but uses a fair amount less bandwidth as well.

Windows Media Player can playback GSM and the encoder is part of Media Foundation in Vista and above (and presumably some Win32 API in XP and below?)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜