Giter VIP home page Giter VIP logo

Comments (11)

jitsi-jenkins avatar jitsi-jenkins commented on June 27, 2024

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.

jitsi-jenkins avatar jitsi-jenkins commented on June 27, 2024

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.

Flohack74 avatar Flohack74 commented on June 27, 2024

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.

bgrozev avatar bgrozev commented on June 27, 2024

Yes, I checked that and it was correct.

from libjitsi.

Flohack74 avatar Flohack74 commented on June 27, 2024

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.

Flohack74 avatar Flohack74 commented on June 27, 2024

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.

bgrozev avatar bgrozev commented on June 27, 2024

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.

Flohack74 avatar Flohack74 commented on June 27, 2024

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.

bgrozev avatar bgrozev commented on June 27, 2024

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.

Flohack74 avatar Flohack74 commented on June 27, 2024

Can I already test this in nightly?

from libjitsi.

ibauersachs avatar ibauersachs commented on June 27, 2024

Not in the Jitsi nightlies. As Boris said, this will take quite some time.

from libjitsi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.