Comments (11)
I can confirm this issue is present with all of Linux, Windows, and Android versions of jitsi. If someone can point me to the involved parts of the code I may be able to at least have a look at what is going wrong here.
from libjitsi.
We initialize the encoder here: https://github.com/jitsi/libjitsi/blob/master/src/org/jitsi/impl/neomedia/codec/audio/opus/JNIEncoder.java#L246
from libjitsi.
Did someone already enable debug log and check if the used value is correct in the following output?
logger.debug(
"Encoder settings: audio bandwidth " + bw + ", bitrate "
+ Opus.encoder_get_bitrate(encoder) + ", DTX "
+ Opus.encoder_get_dtx(encoder) + ", FEC "
+ Opus.encoder_get_inband_fec(encoder));
from libjitsi.
Yes, I checked that and it was correct.
from libjitsi.
Ok so its strange because you can see the log information tries to ask Opus itself to report the bitrate. Jitsi cannot do more than to ask for the bitrate in setup and then check if it has been set. If the codec itself ignores the request somehow we cannot know at the moment Im afraid. It would need some more testing of the used Opus lib and whats going wrong there.
from libjitsi.
Boris, I also wrote you a mail...
I think I found the Opus issue... look in the JNIEncoder.java into this function setFormatParameters... there maxaveragebitrate is used to set the bitrate, if any supplied userbitrate is higher:
/**
* Sets the format parameters.
*
* @param fmtps the format parameters to set
*/
@Override
public void setFormatParameters(Map<String, String> fmtps)
{
if (logger.isDebugEnabled())
logger.debug("Setting format parameters: " + fmtps);
/*
* TODO Use the default value for maxaveragebitrate as defined at
* http://tools.ietf.org/html/draft-spittka-payload-rtp-opus-02#section-6.1
*/
int maxaveragebitrate = 40000;
try
{
String s = fmtps.get("maxaveragebitrate");
if ((s != null) && (s.length() != 0))
maxaveragebitrate = Integer.parseInt(s);
}
catch (Exception e)
{
// Ignore and fall back to the default value.
}
Opus.encoder_set_bitrate(
encoder,
(maxaveragebitrate < bitrate) ? maxaveragebitrate : bitrate);
Can it be that this function runs after the initial setup, thereby limiting the encoder to 40kbps as the user wrote? Im sorry I icant test this, I have no Java environment here
from libjitsi.
Absolutely, this looks like its the problem! Thank you for posting it (I have not received an email from you).
I just pushed a fix. Unfortunately because of this issue I haven't tested it with Jitsi, and I don't know when it will land there.
from libjitsi.
You are welcome. By the way I dont get the point of having maxaveragebitrate and bitrate in this code. Why is this necessary? (maxaveragebitrate < bitrate) ? maxaveragebitrate : bitrate);
from libjitsi.
maxaveragebitrate comes from the remote side. We honor it by not exceeding it, but we shouldn't increase our sending bitrate just because the remote side reported that they can handle it. In practice, if the remote side is Jitsi, maxaveragebitrate isn't included.
from libjitsi.
Can I already test this in nightly?
from libjitsi.
Not in the Jitsi nightlies. As Boris said, this will take quite some time.
from libjitsi.
Related Issues (20)
- DatagramTransportImpl constructor Javadoc is out of date?
- SRTCPCryptoContext constructor Javadoc is out of date?
- Change output device due to race condition
- Use Freedesktop's XDG User Dirs under linux
- LibJitsi.start() freezes on simple OSGi-less project in macOS HOT 1
- Adding linux-aarch64 and linux-arm to the build HOT 1
- SRTP protocol HOT 1
- There is no source code of jnffmpeg jnopus and so on HOT 1
- numerous issues identified by lgtm.com/
- Source code for the FFmpeg binary HOT 1
- libjitsi ->stanza.io HOT 1
- Not an issue but a question. Get RMS and Peaks level from the speakers.
- Activating a research fault localization bot on your project?
- The DTMFDispatcher thread of the DtmfTransformEngine is not stopped when the DtmfTransformEngine is closed
- Unable to use libjitsi for audio streaming to an IP address and port HOT 5
- Unable to load library jnmaccoreaudio HOT 2
- support mac m1? HOT 1
- Java LTE 17 Path Error HOT 3
- Enable libjitsi logging HOT 4
- Occasionally Jigasi stop forwarding SIP audio due to race condition
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libjitsi.