-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added encoder complexity and codecs.conf parsing #4
base: asterisk-13.7
Are you sure you want to change the base?
Conversation
The Asterisk team seems to have different defaults in their You created a new section called ‘opus-open-source’ in |
I chose a different name in case one has both plugins installed, so that you could configure them differently: not sure that would even work, actually, but that was the rationale behind it. Of course that can be changed. |
Puh. What would be the (potential) benefit of having two modules installed for the same audio format at the same time. I have problems to envision such a benefit, therefore that rationale did not come to mind before. |
I'm not saying it makes sense, I'm saying I wanted to leave doors open to the possibility and that's why I did it like that 😉 |
Please, go the other way. Align with the Digium solution as much as possible (complexity, section name). If there is no known rationale, making something different is just more complex. If you like, you can add a comment about your experience (4 is a good default for a scenario of…; if you need a separate section name, please, create a Pull Request via Github…). Or stated differently: Any difference needs a rationale in my world, because users do not except differences but uniform/known behavior. I love good defaults. However, if you want to change the default, convince the Asterisk team. |
Apologies for the awfully late reply, but I've been pretty swamped. I'll try and adapt the patch as you suggested as soon as I have some time to do that. |
Hi, |
The question is: How do you configure the module and do you have installed just this module (and not the one from Sangoma Digium as well). Because this Pull Request (PR) here, was not merged yet, you still have to change the source code to configure this module. Did that answer your question? |
I have installed this module (not the one provided by Digium) and i also did changes to the code according to this PR, but still the SDP didn't get updated. |
As promised, here's a simple PR that adds a call to the
OPUS_SET_COMPLEXITY
control in order to set up the complexity of the encoder when creating it. The default complexity value used in this patch, as specified in a new#define
inopus.h
, is4
, which gives a good quality/cpu tradeoff, but you can override it incodecs.conf
.This PR, in fact, also adds
codecs.conf
parsing to the module. At load/reload it looks for the[opus-open-source]
context, and can override some of the defines, namely complexity, default bitrate, cbr/vbr, FEC and DTX. Other settings can be added later on, if needed. An example of a working context is as follows:The PR doesn't modify the stock
codecs.conf
, as that would likely require an ad-hoc patch to apply rather than a brand new file to copy over the existing one, in order to avoid loosing new settings that other codecs may add in future versions. I guess that simply clarifying in the README you can configure some settings will probably be enough.