-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 ?
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