How to set audio quality to maximum

Hi,

i tried to change the audio settings to

navigator.mediaDevices.getUserMedia({
        video: ...
        audio: {
          sampleRate: 48000,
          sampleSize: 16,
          autoGainControl: false,
          channelCount: 2,
          echoCancellation: false,
          latency: 0,
          noiseSuppression: false,
        },

I could not hear a change in audio auality, the consumer stats bitrate was always ~ 70k,

[
    {
      "bitrate": 71888,
      "byteCount": 3183750,
      "firCount": 0,
      "fractionLost": 0,
      "kind": "audio",
      "mimeType": "audio/opus",
      "nackCount": 0,
      "nackPacketCount": 0,
      "packetCount": 17727,
      "packetsDiscarded": 0,
      "packetsLost": 0,
      "packetsRepaired": 0,
      "packetsRetransmitted": 0,
      "pliCount": 0,
      "roundTripTime": 0.6561279296875,
      "score": 10,
      "ssrc": 928067862,
      "timestamp": 7710998,
      "type": "outbound-rtp"
    },
    {
      "bitrate": 73488,
      "byteCount": 3568831,
      "firCount": 0,
      "fractionLost": 0,
      "jitter": 0,
      "kind": "audio",
      "mimeType": "audio/opus",
      "nackCount": 0,
      "nackPacketCount": 0,
      "packetCount": 19425,
      "packetsDiscarded": 0,
      "packetsLost": 0,
      "packetsRepaired": 0,
      "packetsRetransmitted": 0,
      "pliCount": 0,
      "roundTripTime": 0.030517578125,
      "score": 10,
      "ssrc": 1366832477,
      "timestamp": 7710998,
      "type": "inbound-rtp"
    }
  ]
]

what else do I need to change to get max quality?

I’m afraid this topic is not related to mediasoup at all. Maybe someone will wish to reply you, but do not expect help regarding this topic from mediasoup authors.

As we said in https://mediasoup.discourse.group/t/community-means-helping-others-not-just-yourself/:

I won’t help in topics such as:

  • Generic questions about WebRTC (getUserMedia, browser permissions, browser limitations, etc).

Hello

i do not agree that this is not related to mediasoup, As far as I know, usually (webRTC without mediasoup) the audio quality is part of the SDP, with mediasoup v3 however you never deal with the SDP directly (mediasoup-server and client). So the question remains how to change audio quality? Maybe the question should be: At what point is the SDP exchanged from mediasoup-client -> server ?

alos if i understand mediasoup correct the server initiate the negotiation. so the question is how modify the SDP and where ?

Regards

You did not even mention any mediasoup or mediasoup-client API in your topic description. Of course this is not related to mediasoup. To be clear: getUserMedia() is not related to mediasoup.

Then the response should be: read the docs. Where in the docs you read that mediasoup-client exchange a SDP with mediasoup server? I cannot explain everything from scratch so hope this helps:

Where do you read that the server initiate the negotiation?

BTW mediasoup-client has options to affect OPUS settings in the SDP:

the quesstion was not precise enough / misleadingly written

thank you very much