Since I subscribed to voip.ms, I have read several wikis, and I realize that codec recommendations varies a lot from one wiki page to the other.
From what I understand, G722 is the best codec offered in terms of voice quality, and is often referred as ‘HD call’.
Also, I noticed that G722 is disabled by default when you create sub-account.
Why is that ? Are we afraid of the bandwidth consumption needed by G722 or is there something else I’m missing?
Thanks.
Hello @mdastous,
I do not know why it is not activated by default, but it is a “recent” addition. For the bandwidth, this is about the same (except for G.729), but requires more computing power and introduce latency, which might be an issue or not depending on use cases.
- G.729 = low quality, low bandwidth, low latency (0.1 ms)
- G.711u = better audio, at 64 kbit/s, low latency (0.125 ms)
- G.722 = much better audio (wideband), also at 64 kbit/s using compression, higher latency (40 ms end to end, so 0.2 ms).
You can dig down more info here and there:
So in the end this is really a question of use case. On my cellphone (using Groudwire), when in WiFi mode, I use G.722, and when using data, I use G.729.
Kind regards!
Alexandre
1 Like
What about OPUS ? Looks like it’s new trend now… unfortunately it`s not support by voip.ms
1 Like
Yeah, there are many other codecs, like Opus, but I never gave much attention to them since voip.ms is not supporting them.
It would be interesting to know what are the technical considerations for voip.ms to support or not a codec. There might be technical considerations?
I think they might be avoiding codecs that individually are complex to compress, if you take a closer look, you will notice that voip.ms is using the G.729a codec rather than plain G.729. The Annex A version of the codec is compatible with plain decoders on the other side, but uses a different algorithm that uses less CPU cycles at the expense of some quality. The other three supported codecs (G.711, GSM and G.722) are pretty light on CPU cycles, so I think they want to support hundreds, thousands or tens of thousands of concurrent calls per server and the main constraint might be the CPU. I have yet to see how light of a codec Opus and other modern friends are compared to the legacy codecs.
1 Like
@DavidR Would be interesting to have your thoughts on HD codecs. I fully understand that external calls will probably never support G.722, but I feel like there should be an option to use G722 for ‘internal’ calls.
The only workaround right now to get HD calls is to setup a second dedicated sub account (supporting G722 codec only) on every device.
I really like voip.ms service, but it blows my mind that HD codec is so difficult to access. That should be a key feature to differentiate from traditional telephony, not mentioning that other online service (ie Ms teams) offer this.
Hello @mdastous,
I am using HD codecs all the time (G722). Why are you saying you need two accounts and that this is difficult to access? Is there something not working will with your actual setup or devices?
- When you create a subaccount, just check G722 as also available.
- On your SIP device, make G722 as the first preferred codec to be used.
- If you SIP device allows two modes (WiFi/Network, Mobile Data), set the codec you prefer in both cases. I have G722 on local networks, and G729A for mobile data. (This is my personal choice as I could use G722 in both cases.)
Then you are good to go. The quality difference is evident right on the first call.
Kind regards!
Unfortunately, it’s a little bit more complicated than that…
If G711 is enabled on your (sub)account, voip.ms server will always set G711 as the highest priority codec (you can check SIP log, also confirmed by support).
Of course you can force G722 on your device to ignore the server’s priority list, but then if you do that, when you make an external call (ie outside voip.ms network), G722 codec will get transcoded to G711, potentially causing lag and creating a call quality worst than using straight G711.
Also forcing specific codec on some device may not be straightforward, sometimes it’s only possible when you are the caller/callee.
1 Like
Oh, I did not know that. So it would be nice to have the possibility to specify the codec priority on Voip.ms side too. And also, be sure that the prefered client priority is respected.
I just sent a feature request to make it possible to set G722 at higher priority on Voip.ms side (i.e. set codec prefered order), and only use G729A when the client app asks for it (mobile data, roaming).
I invite anyone landing on this thread to do the same.
As a follow up, a major US VoIP provider recently announced that it will offer HD for calls made from/to selected Cellphone US carrier.
Maybe there is some hope to have HD codec adopted more broadly…
Btw, for recent experiences, it not always desirable to use G.722 over a cell phone network, G.722 requires quite a a lot of bandwidth, and is better fit for wired home/office usage…
This is where OPUS excels, while it can sounds as good as G.722 (and maybe even better), it has the ability to lower its bitrate when bandwidth is limited.
@aleclerc
Very good initiative!
BTW, I have set my softphone (which I use with VOIP.MS as well as two European providers) to only use OPUS or G.722, since either or both of those codecs are supported by all - of course, calls get transcoded to G.711 when someone I call does not have a HD voice capable phone, but I find that especially businesses tend to have HD capable systems, so I quite often get to use HD voice end-to-end. Cell phones in Japan are another example of HD voice as standard…
1 Like
@mdastous
One reason why many provides don’t (yet) support Opus could be that it requires more CPU resources than any of G.722, G.721, and G.729a.
And some general remarks:
G.722 is a very good choice for HD voice, since it uses the same bandwidth as G.711 (the “old” regular phone standard). G.722 can also be easily transcoded to G.711 (after which the audio does not sound any worse than if it had been encoded with G.711 from the start).
In a few situations where I was able to compare the audio quality of G.722 and Opus I did not notice any difference with voice, but G.722 appears to transmit lower frequencies better and thus produces better sound when listening to wide-spectrum “on hold” music.
@amateur The main advantage of OPUS is its variable bitrate (6 to 128 kbps), so if bandwidth is limited (i.e. over cellular network), it will lower the bitrate to avoid choppy audio. G722 is not always reliable on cell phones, unless you right in front of a cellular tower.
Afraid? G.722 does not require more bandwidth than G.711…
In the interest of new users, it worth mentioning that one does not need a workaround to get HD voice, even if one wanted to use only main account (which, if one only uses on phone number, is all that is needed): to select or unselect G.711, G.729, or G.722 → “account settings” → “advanced settings”.