i-p-tel / sipdroid

Free SIP/VoIP client for Android
http://sipdroid.org
GNU General Public License v3.0
638 stars 265 forks source link

Opus codec ? #1021

Open sp2ong opened 7 years ago

sp2ong commented 7 years ago

Is it possible add opus codec ? https://opus-codec.org/ we can use opus codec in asterisk with PC softphone like PhonerLite it will be nice to have opus codec on android sip pone

Regards

niutech commented 4 years ago

There is sipdroid-pro, which adds Opus & AAC.

sjlongland commented 4 years ago

@niutech Unfortunately, AAC makes it problematic.

…a patent license is required for all manufacturers or developers of AAC codecs. For this reason, free and open source software implementations such as FFmpeg and FAAC may be distributed in source form only, in order to avoid patent infringement. (See below under Products that support AAC, Software.)

https://en.wikipedia.org/wiki/Advanced_Audio_Coding#Licensing_and_patents

sipdroid-pro is also not available on F-Droid, which is where I got sipdroid from. Possibly for the reason mentioned above.

jln-ho commented 4 years ago

Original author of sipdroid-pro here. You can fork sipdroid-pro and simply remove all the AAC related stuff, should be fairly straightforward. On second thought, it may actually make more sense to fork sipdroid and then port Opus support over from sipdroid-pro.

I'm not sure whether the license terms quoted by @sjlongland actually apply to sipdroid-pro, though. It uses Fraunhofer FDK AAC, which seems to have a slightly more permissive license:

Redistribution and use in source and binary forms, with or without modification, are permitted without payment of copyright license fees provided that you satisfy the following conditions:

You must retain the complete text of this software license in redistributions of the FDK AAC Codec or your modifications thereto in source code form.

You must retain the complete text of this software license in the documentation and/or other materials provided with redistributions of the FDK AAC Codec or your modifications thereto in binary form. You must make available free of charge copies of the complete source code of the FDK AAC Codec and your modifications thereto to recipients of copies in binary form.

The name of Fraunhofer may not be used to endorse or promote products derived from this library without prior written permission.

You may not charge copyright license fees for anyone to use, copy or distribute the FDK AAC Codec software or your modifications thereto.

Your modified versions of the FDK AAC Codec must carry prominent notices stating that you changed the software and the date of any change. For modified versions of the FDK AAC Codec, the term "Fraunhofer FDK AAC Codec Library for Android" must be replaced by the term "Third-Party Modified Version of the Fraunhofer FDK AAC Codec Library for Android."

sjlongland commented 4 years ago

@jln-ho Yeah, what you've quoted there is a software license, not a patent license. I avoid AMR for the same reason even though it'd guarantee better compatibility with mobiles. Thankfully somewhere in the VoIP service chain, G.722 gets transcoded to AMR-WB anyway, so it winds up not mattering much -- the patent license becomes "not my problem".

I use AAC in other things, notably DAB+, where I do not get a choice in the matter (all the Brisbane radio stations are broadcasting using HE AAC… Want to listen? You need to decode HE AAC), but the vast majority of the calls I receive are G.711a. Long term though, I see this changing as more people leave the PSTN and move to VoIP and VoLTE services, so it makes sense to support some other CODECs.

Opus seems to be one that is actually being adopted. Some devices out there also support Speex. Given these are free and open CODECs, I'm willing to give them my support.