Hacker News new | ask | show | jobs
by leovonl 3400 days ago
Latency and speed are two very different things. For good audio quality, the first is way more important than the later.

Also, lossy codecs usually drop a good chunk of information in favour of compression, working with larger packets for better efficiency and adding even more latency. In that sense, G.711 or higher-quality PCM is the best if you want lowest latency possible.

I've worked for some time with telecom to know that each time you add a complex codec (G.72x) you may end up doing a few conversions on the way: in most gateways, if audio comes in as codec X, it gets converted to PCM internally and then re-converted to codec X again before going to the other end. Adding bypass logic adds little benefit as you have to scale the system for worst case scenario (all channels performing the costlier compression), so bypass only complicates your code.

So those "X ms of algorithmic latency" for complex codecs may end up being multiplied a few times: throw in echo cancelling, jitter buffers, etc and you get a call where you end up interrupting each other all the time due to audio delay.