[jitsi-dev] Force Stereo and High Bitrate in Jitsi Meet?

Hi!

Apologies if this isn't the right list to post this question.

I have an installation of jitsi-meet on Ubuntu, but I'm struggling to find
a solution to force stereo audio.

So far I've tried adding combinations of URL parameters, similar to how
apprtc handles it (e.g. https://apprtc.appspot.com/params.html) but I'm
still getting mono. Is it possible to pass similar URL parameters to
jitsi.si?

My use case is a stereo music signal that I am trying to send over WebRTC
at the highest possible bitrate, so I'm fine with specifying a minimum
bitrate in the Opus encoder (not sure if this is possible).

Any hints on how I could go about this? Is there a place to change the
default Opus settings used? I'm guessing it's in the videobridge, but for
the life of me can't figure out where or what to change. Thanks for any
pointers you can spare. I'm tearing my hair out trying to get this working!

Hi Christian,

Hi!

Apologies if this isn't the right list to post this question.

This is the right place!

I have an installation of jitsi-meet on Ubuntu, but I'm struggling to find a solution to force stereo audio.

So far I've tried adding combinations of URL parameters, similar to how apprtc handles it (e.g. https://apprtc.appspot.com/params.html) but I'm still getting mono. Is it possible to pass similar URL parameters to jitsi.si <http://jitsi.si>?

My use case is a stereo music signal that I am trying to send over WebRTC at the highest possible bitrate, so I'm fine with specifying a minimum bitrate in the Opus encoder (not sure if this is possible).

Any hints on how I could go about this? Is there a place to change the default Opus settings used? I'm guessing it's in the videobridge, but for the life of me can't figure out where or what to change. Thanks for any pointers you can spare. I'm tearing my hair out trying to get this working!

You can enable it by adding "#config.stereo=true" to the URL, or adding "stereo: true" in config.js. Note that right now this option does NOT affect the p2p mode, so make sure you're connected through the bridge (set config.p2p.enabled=false). Feel free to open an issue on github if you want to use stereo with p2p.

I don't think we provide a way to set any bitrate parameters for audio, but WebRTC seems to automatically increase it to ~70kbps when stereo is enabled.

I'm curious to hear what your experience with stereo will be.

Regards,
Boris

···

On 28/01/2018 18:52, Christian Grewell wrote:

1 Like

Awesome, thanks Boris! I'll make these changes and even post a example .wav
file comparing the quality. I'll gladly open an issue on Github as well,
maybe I can even try and solve it :slight_smile:

···

On Mon, Jan 29, 2018 at 2:29 PM, Boris Grozev <boris@jitsi.org> wrote:

Hi Christian,

On 28/01/2018 18:52, Christian Grewell wrote:

Hi!

Apologies if this isn't the right list to post this question.

This is the right place!

I have an installation of jitsi-meet on Ubuntu, but I'm struggling to
find a solution to force stereo audio.

So far I've tried adding combinations of URL parameters, similar to how
apprtc handles it (e.g. https://apprtc.appspot.com/params.html) but I'm
still getting mono. Is it possible to pass similar URL parameters to
jitsi.si <http://jitsi.si>?

My use case is a stereo music signal that I am trying to send over WebRTC
at the highest possible bitrate, so I'm fine with specifying a minimum
bitrate in the Opus encoder (not sure if this is possible).

Any hints on how I could go about this? Is there a place to change the
default Opus settings used? I'm guessing it's in the videobridge, but for
the life of me can't figure out where or what to change. Thanks for any
pointers you can spare. I'm tearing my hair out trying to get this working!

You can enable it by adding "#config.stereo=true" to the URL, or adding
"stereo: true" in config.js. Note that right now this option does NOT
affect the p2p mode, so make sure you're connected through the bridge (set
config.p2p.enabled=false). Feel free to open an issue on github if you want
to use stereo with p2p.

I don't think we provide a way to set any bitrate parameters for audio,
but WebRTC seems to automatically increase it to ~70kbps when stereo is
enabled.

I'm curious to hear what your experience with stereo will be.

Regards,
Boris

--

Christian Grewell | 葛瑞田

Assistant Arts Professor, Interactive Media + Business

Partner, Program on Creativity + Innovation

Associate Director, Program Management

http://creativityandinnovation.shanghai.nyu.edu/

Room 950 / 1025
1555 Century Ave., Pudong
Shanghai, China 200122
Phone: +86 021 2059 5890
Cell: +86 186 1656 8844

shanghai.nyu.edu

Hey Christian,

It's probably not stereo or codec bitrate that's trashing your music audio. It's probably the speech-specific processing. I've added these to my config.js and get mp3 quality music:

    stereo: true,
    disableAP: true,
    disableAEC: true,
    disableNS: true,
    disableAGC: true,
    disableHPF: true,

You can probably leave auto gain control (AGC) to false for your application. I had some weird issue with a particular mic that was fixed with that line. You'll want to keep in mind that when processing is off, you'll probably get some intense echo if people are talking over the music. I turned on push-to-talk to mitigate this.

John

···

________________________________
From: dev <dev-bounces@jitsi.org> on behalf of Christian Grewell <christian@nyu.edu>
Sent: Sunday, January 28, 2018 11:02 PM
To: Boris Grozev
Cc: Jitsi Developers
Subject: Re: [jitsi-dev] Force Stereo and High Bitrate in Jitsi Meet?

Awesome, thanks Boris! I'll make these changes and even post a example .wav file comparing the quality. I'll gladly open an issue on Github as well, maybe I can even try and solve it :slight_smile:

On Mon, Jan 29, 2018 at 2:29 PM, Boris Grozev <boris@jitsi.org<mailto:boris@jitsi.org>> wrote:
Hi Christian,

On 28/01/2018 18:52, Christian Grewell wrote:
Hi!

Apologies if this isn't the right list to post this question.

This is the right place!

I have an installation of jitsi-meet on Ubuntu, but I'm struggling to find a solution to force stereo audio.

So far I've tried adding combinations of URL parameters, similar to how apprtc handles it (e.g. https://apprtc.appspot.com/params.html) but I'm still getting mono. Is it possible to pass similar URL parameters to jitsi.si<http://jitsi.si> <http://jitsi.si>?

My use case is a stereo music signal that I am trying to send over WebRTC at the highest possible bitrate, so I'm fine with specifying a minimum bitrate in the Opus encoder (not sure if this is possible).

Any hints on how I could go about this? Is there a place to change the default Opus settings used? I'm guessing it's in the videobridge, but for the life of me can't figure out where or what to change. Thanks for any pointers you can spare. I'm tearing my hair out trying to get this working!

You can enable it by adding "#config.stereo=true" to the URL, or adding "stereo: true" in config.js. Note that right now this option does NOT affect the p2p mode, so make sure you're connected through the bridge (set config.p2p.enabled=false). Feel free to open an issue on github if you want to use stereo with p2p.

I don't think we provide a way to set any bitrate parameters for audio, but WebRTC seems to automatically increase it to ~70kbps when stereo is enabled.

I'm curious to hear what your experience with stereo will be.

Regards,
Boris

--
[https://docs.google.com/a/nyu.edu/uc?id=0ByAuFpDdXkvES3RfeHlWcXM5dkk&export=download]

Christian Grewell | 葛瑞田

Assistant Arts Professor, Interactive Media + Business

Partner, Program on Creativity + Innovation

Associate Director, Program Management

http://creativityandinnovation.shanghai.nyu.edu/

Room 950 / 1025
1555 Century Ave., Pudong
Shanghai, China 200122
Phone: +86 021 2059 5890
Cell: +86 186 1656 8844

shanghai.nyu.edu<http://shanghai.nyu.edu/>

You're receiving this message because you're a member of the john@goor.us<https://outlook.office365.com/owa/john@goor.us/groupsubscription.ashx?realm=goor.us&source=EscalatedMessage&action=conversations> group. If you don't want to receive any messages or events from this group, stop following it in your inbox<https://outlook.office365.com/owa/john@goor.us/groupsubscription.ashx?realm=goor.us&source=EscalatedMessage&action=unsubscribe>.

View group conversations<https://outlook.office365.com/owa/john@goor.us/groupsubscription.ashx?realm=goor.us&source=EscalatedMessage&action=conversations> | View group files<https://outlook.office365.com/owa/john@goor.us/groupsubscription.ashx?realm=goor.us&source=EscalatedMessage&action=files>

1 Like

Hi,
Can you please share the path of the config.js file ?
Thanks & regards
Vinod

If you installed Jitsi Meet with the quick install procedure, then it’ll be i /etc/jitsi/meet/your-domain-config.js

thank you saghul. is it possible to set the opus bit rate to a higher value ?
regards
Vinod

Not, as far as I know. Opus uses variable bit rate, which adjusts to network conditions.

Thanks again Saghul. What are the libraries used for the video and audio ?
Regards
Vinod

Jitsi Meet runs in a browser, which uses the WebRTC engine. All browers use libopus for the Opus codec. For video, they also all use libvpx for VP8/9. H.264 is a slightly different story, because of hardware acceleration.

thanks for your inputs
vinod

Does this setting also affect shared desktop music (shared screen + audio)?

I would like to describe my question in more detail:
I use a microphone and music that I can either play directly in the computer or send together with the microphone via a mixing console (Zoom R 16 audio interface) via the USB connection to the computer.
In Jitsi there is the possibility to share the desktop + audio. Does it make sense to do that? Or is it better to mix the music with the speech in the mixer and then transfer it as microphone sound in chats.

In researching how this all works (using meet.jit.si), does this string in the URL(config.p2p.enabled=false) needed for stereo/better audio still mean I cannot use stereo and p2p? And I understand p2p to be much preferred for 1 on 1 meetings.

Sorry, I don’t know. Perhaps others can chip in, or you can experiment more with it to find out.

That is correct, the ‘stereo’ setting is only applied on the server connection. For P2P we just use the default settings in the browsers, which don’t include stereo.

Boris

Thanks for the reply! I noticed it was 2 years ago when you said “right now,” so I wondered if there was any change. I noticed there’s an experimental flag in Edge (Chromium) to enable WebRTC multi-channel capture audio processing. I don’t know if that’s related or not.

Hi guys,
unfortunately I never got these results; I have to send piano sound in videochat, so I disabled all audio processing in my Jitsi server, adding the line stereo: true, too, but while getting good results about the sound (bandwith, dynamic) I didn’t get the stereo stream.
Any idea?

many thanks

I am also not able to get stereo audio with the above settings applied to config. I’ve disabled p2p and all audio processing (disableAP, disableAEC, disableAGC, etc.) and also set stereo to true, but I’m still not hearing stereo audio.

opus can be have bitrate specified according to the docs. When you look in the logs, there is an XML snippet coming from jvc which shows the opus calls, and the rate specified there is 48000 which I assume means 48k bitrate. This can be increased. For the musician people we would expect no less than 128k but prefer going to 320k.

What I cannot find is where that xml snippet gets deployed. It would be good if we can specify this somewhere.

Ok, I have found something that improves quality! I cannot find documentation that says what I am doing is correct, however if you search for opus, the JVI has some configurations.

FYI I am using docker so the standard implementation will have these elsewhere:
/opt/docker-jitsi-meet/jigasi/rootfs/defaults/ sip-communicator.properties

Find the line:
net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.opus/48000=450

Set it to:
net.java.sip.communicator.impl.protocol.sip.acc1.Encodings.opus/99999=0

If I am correct, the first parameter is bitrate which seems to only allow for 5 digits, so the highest number that works is 99999. Above 100000 you can see audio is being transmitted through the channel bar, but nothing can be heard.

The second I think is quality from 0-1000 where 0 seems to be better quality than 1000.

Opus encoder has parameters that can be sent which govern the stream type. There should be a config that we can send that specifies OPUS_SIGNAL_VOICE or OPUS_SIGNAL_MUSIC. Would be a good idea that Jitsi can have these parameters assigned.

References here:
https://www.opus-codec.org/docs/html_api/group__opusencoder.html
https://opus-codec.org/docs/opus-tools/opusenc.html

1 Like