$("#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);
}
}
});
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'
})
Seems like the following settings should help if your goal is sound quality: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?
constraints: {
audio: {
bitrate: 128000,
stereo: true
...
},
video: {
...
}
}
media_transponder.sdp
in /usr/local/FlashphonerWebCallServer/conf
folder with the following content: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
sudo /usr/local/FlashphonerWebCallServer/bin/webcallserver set-permissions
sudo systemctl restart webcallserver
Try also to setI think "echoCancellation: false" is doing its thing but the problem is that the audio volume goes down.
googEchoCancellation: false