Microphone increase volume

Max

Administrator
Staff member
Good day.
You can set microphone gain in Chrome browser:
1630981908356.png

Code:
    $("#micGainControl").slider({
        range: "min",
        min: 0,
        max: 100,
        value: currentGainValue,
        step: 10,
        animate: true,
        slide: function (event, ui) {
            currentGainValue = ui.value;
            if(publishStream) {
                publishStream.setMicrophoneGain(currentGainValue);
            }
        }
    });
 

rickKoch

New Member
Thank you. That worked, but didn't fixed my problem. What I'm trying to do is to do a stream WebRTC over RTMP, but the sound in the background is corrupted, or we can't hear it well.

I tried with this implementation:
Code:
session.createStream({
                name: streamName,
                display: videoRef.current,
                cacheLocalResources: true,
                receiveVideo: false,
                receiveAudio: false,
                rtmpUrl: rtmpUrl,
                disableConstraintsNormalization: true,
                constraints: {
                    audio: {
                        echoCancellation: true,
                        googEchoCancellation: true,
                        autoGainControl: false,
                        googAutoGainControl: false,
                        noiseSuppression: false,
                        googNoiseSuppression: false,
                        latency: 0
                    },
                    video: {
                        width: 1280,
                        height: 720,
                        deviceId
                    }
                },
                transport: 'TCP'
            })
Any suggestions on how we can fix the background audio?
Thank you.
 

Max

Administrator
Staff member
Please try to raise audio publishing bitrate, for example
Code:
constraints: {
    audio: {
        bitrate: 64000,
        ...
    },
    video: {
        ...
    }
}
 

rickKoch

New Member
Thank you. This increased the quality, but the noise cancellation is still there. For example if there is a music in the background the audio is really bad. How can I stop noise cancellation?

Or can you please provide some configuration that is good for WebRTC streaming over RTMP with good audio config?
 

rickKoch

New Member
I think "echoCancellation: false" is doing its thing but the problem is that the audio volume goes down.
 
Last edited:

Max

Administrator
Staff member
For example if there is a music in the background the audio is really bad.
...
Or can you please provide some configuration that is good for WebRTC streaming over RTMP with good audio config?
Seems like the following settings should help if your goal is sound quality:
1. Raise publishing bitrate and set up stereo publishing:
Code:
constraints: {
    audio: {
        bitrate: 128000,
        stereo: true
        ...
    },
    video: {
        ...
    }
}
2. Create the file media_transponder.sdp in /usr/local/FlashphonerWebCallServer/conf folder with the following content:
Code:
v=0
o=- 1988962254 1988962254 IN IP4 0.0.0.0
c=IN IP4 0.0.0.0
t=0 0
a=sdplang:en
m=video 0 RTP/AVP 95
a=rtpmap:95 H264/90000
a=fmtp:95 profile-level-id=4de01f;packetization-mode=1
a=recvonly
m=audio 0 RTP/AVP 108 103
a=rtpmap:96 mpeg4-generic/8000/1
a=rtpmap:97 mpeg4-generic/11025/1
a=rtpmap:98 mpeg4-generic/12000/1
a=rtpmap:99 mpeg4-generic/16000/1
a=rtpmap:100 mpeg4-generic/22050/2
a=rtpmap:104 mpeg4-generic/24000/2
a=rtpmap:102 mpeg4-generic/32000/2
a=rtpmap:103 mpeg4-generic/44100/2
a=rtpmap:108 mpeg4-generic/48000/2
a=recvonly
Then restart WCS:
Code:
sudo /usr/local/FlashphonerWebCallServer/bin/webcallserver set-permissions
sudo systemctl restart webcallserver
I think "echoCancellation: false" is doing its thing but the problem is that the audio volume goes down.
Try also to set googEchoCancellation: false
If audio volume still is not enough, try to raise microphone gain as recommended above
 
Top