What is the audio encoding codec that has the less latency?

-1

1

There is a lot of audio codecs :

  • MP3
  • AAC
  • FLAC
  • OGG
  • SPEEX
  • etc

Some compress a lot and other less .... however it does not mean that one codec is having less less latency than another.

For a general purpose use (music and voice) and for an average audio quality (it is ok to have some loss) :

what is the audio codec that offers the encoding with the lesser latency possible on modern PC and commonly supported ?

Antoine RODRIGUEZ

Posted 2012-03-04T16:33:43.200

Reputation: 121

Opus is designed specifically for the application you describe, with a default algorithmic latency of just 26.5 ms. – bwDraco – 2015-11-22T08:51:35.303

Hmm...it's hard to say in general. You should try with your specific data (multiple files), and adjusting the compression settings for the given format; see what gets you the maximum bang for buck. As you tagged this [audio-streaming], note that codec availability at the receiving end might also be a concern, esp. with patented/unusual codecs and/or on smartphones. – Piskvor left the building – 2012-03-04T17:00:34.230

Use OGG. Many user uses or Speex. – YumYumYum – 2012-03-04T17:51:39.690

1Any of these can go several times faster than realtime, what's more, encoding is often done just once. What are you trying to accomplish where you think encoding performance is a significant issue? Most of the time other priorities, like available bandwidth and receiver codec availability, latency/encoding delay, etc. are far more pressing issues than CPU requirements to encode. – afrazier – 2012-03-04T18:10:20.460

Thank you all for your answers. as afrazier pointed out, I'm looking the one that has the less "latency/encoding delay". I'll correct my question. – Antoine RODRIGUEZ – 2012-03-05T19:49:47.057

WAV or PCM obviously has the least latency, because there's no encoding. What are you trying to accomplish? – endolith – 2012-05-08T20:53:45.600

@arazier: "Faster than realtime" is irrelevant if you have to buffer 500 seconds of data before you start encoding. – endolith – 2012-05-08T20:57:48.637

@endolith : I think that arazier meant that the codecs can encode faster a song than the total time of the song (eg can encode in 10 seconds a song of 3 minutes). What I try to do is a general purpose audio chat with low latency over a LAN that tries to be with the lesser bandwidth possible. There is audio chat systems, however they all have several seconds of latency witch is unacceptable in my case. I'm looking for something with less than 500ms of latency between the moment that the sound is emmited and eared. I have the network and capture part covered. I only miss the codec part. – Antoine RODRIGUEZ – 2012-05-10T17:42:38.993

@AntoineRODRIGUEZ: Yes, that's what I mean. You're asking about latency and arazier is talking about processing time, which is not the same thing. – endolith – 2012-05-10T18:35:45.060

1at first my question was misphrased ... so he helped me to rephrase my question ;) – Antoine RODRIGUEZ – 2012-05-10T18:49:11.017

Answers

1

Knowing more about what you want to accomplish would help us give you a more appropriate answer. Are you working on some sort of voice/video chat client? If so, what's it going to run on? PCs only, or are you looking at portable (smartphone) implementations too? Or are you looking at some sort of audio streaming? What's your content? What are your clients?

If you're looking to minimize encoding delay, Speex may be your most mature implementation right now over a wide range of natural audio. Opus and AAC-LD are also available, but I'm not as confident of their relative maturity or penetration AAC-LD has the advantage of being backed by a large standards body and may have more hardware implementations available than the others.

That said, in a recent 64 kb/s listening test over at Hydrogen Audio, CELT was ranked above all of Vorbis, Nero HE-AAC and Apple's HE-AAC implementations with regards to sound quality. Results link.

afrazier

Posted 2012-03-04T16:33:43.200

Reputation: 21 316

0

I think the question is also related to the encoding window of the codecs. It seems like the standard compression technology is not designed for low latency, but there are standards that are already mentioned in other answers. See also

https://en.wikipedia.org/wiki/Opus_(audio_format)

vincenzoml

Posted 2012-03-04T16:33:43.200

Reputation: 101