Enable AEC in google Chrome

1,702 views
Skip to first unread message

Ju Ju

unread,
Jul 3, 2018, 9:50:14 PM7/3/18
to meetecho-janus
Hi,

Regarding Webrtc internals (in the get user media AND regarding AEC KPI which are not here) AEC is not enable like it could be here :



I tried to modify janus.js for instance changing

L921: mediaConstraints : null
to

mediaConstraints: {"audio": {"optional": [{"googEchoCancellation": "true"}, {"googAutoGainControl": "true"}, {"googNoiseReduction": "true"}], "mandatory": {}}}



or changing 

L1700

var constraints = { mandatory: {}, optional: []};

to

var constraints = {"audio": {"optional": [{"googEchoCancellation": "true"}, {"googAutoGainControl": "true"}, {"googNoiseReduction": "true"}]}};


But overtimes it seems to be fully ignored, still no constraints in the getusermedia :(





Can you help me and point me out where I have to made change ?


J-

Ju Ju

unread,
Jul 4, 2018, 5:42:34 AM7/4/18
to meetecho-janus
I was able to modify janus.js to get the right getusermedia request with the "optional" constraints
and in webrtc-internals I can see the right constraints

Audio Constraints
{advanced: [{googEchoCancellation: {exact: true}}, {googAutoGainControl: {exact: true}}, {googNoiseReduction: {exact: true}}]}
Video Constraints
{width: {min: 1280, max: 1280}, height: {min: 720, max: 720}}

However I have no AEC KPI so it means it doesn't work !

I should have something like this

googResidualEchoLikelihood0.17052409052848816
googResidualEchoLikelihoodRecentMax0.17123322188854218
googTrackId521e2a25-45fc-4d03-8b23-d1b72b3f3c43
googTypingNoiseStatefalse
aecDivergentFilterFraction0
packetsLost0
googJitterReceived2
googRtt1
googEchoCancellationEchoDelayStdDev0


The only difference with the appr.tc is the audio codec (ISAC vs OPUS)
From my study AEC in chrome should works fine with OPUS


Do you have any idea why I don't have echo cancellation enable ?

J-

Lorenzo Miniero

unread,
Jul 4, 2018, 5:53:15 AM7/4/18
to meetecho-janus
I think you're more likely to get an answer if you ask on discuss-webrtc, as this is more of a browser related question, and more people may have something to say.

L.

Ju Ju

unread,
Jul 4, 2018, 6:11:49 AM7/4/18
to meetecho-janus
Hi Lorenzo,

As it works in the "same browser" with another app not using janus, I was just asking if it could be an issue relative to janus ?

J-

Lorenzo Miniero

unread,
Jul 4, 2018, 6:13:12 AM7/4/18
to meetecho-janus
I don't see how it could, considering we're talking of JavaScript constraints.

L.

Ju Ju

unread,
Jul 4, 2018, 6:53:45 AM7/4/18
to Lorenzo Miniero, meetecho-janus
Maybe I will say something stupid but I ‘m not sure it is 100% javascript relative :

First it is not relative to audio codec (I tried with ISAC also on janus)

I was asking myself if it is not relative to how the streams are handle in the peerco

When I start 1 tab of appr.tc (with audio only) in webrtc-internals I have only a ssrc for sending and AEC is not enable -> no surprise at a need a peer
When 1 start the second tab of apps.tc (with audio only) I m starting to have a ssrc for receiving also and AEC is starting
As I have no media server between, I have in the same peerco 2 ssrc: send + recv

As janus is not working like like, with the same configuration I have 4 peerco and chrome seems to not start AEC in this configuration

Off  it is just an hyposthesis

--
You received this message because you are subscribed to a topic in the Google Groups "meetecho-janus" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/meetecho-janus/Z0qZko86cO0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to meetecho-janu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lorenzo Miniero

unread,
Jul 4, 2018, 6:56:20 AM7/4/18
to meetecho-janus
If AEC only works for media coming and going on the same PeerConnection, that might be it. You can try if it works with the VideoCall demo (which is more like appr.tc but with Janus in the middle), instead of the VideoRoom to validate this idea.

L.
To unsubscribe from this group and all its topics, send an email to meetecho-janus+unsubscribe@googlegroups.com.

Ju Ju

unread,
Jul 4, 2018, 7:07:24 AM7/4/18
to Lorenzo Miniero, meetecho-janus
Hi Lorenzo,

Thanks for the tip , it works with video call ! 

I confirm also you don’t need to modify janus.js to add constraint: AEC is enable by default

Thanks for the help Lorenzo, I guess we will have to wait now for multi stream in 1 peerco for video room :)

J-



To unsubscribe from this group and all its topics, send an email to meetecho-janu...@googlegroups.com.

Lorenzo Miniero

unread,
Jul 4, 2018, 7:12:25 AM7/4/18
to meetecho-janus
Il giorno mercoledì 4 luglio 2018 13:07:24 UTC+2, Ju Ju ha scritto:
Hi Lorenzo,

Thanks for the tip , it works with video call ! 

I confirm also you don’t need to modify janus.js to add constraint: AEC is enable by default

Thanks for the help Lorenzo, I guess we will have to wait now for multi stream in 1 peerco for video room :)



I don't think that would help either, as the current plan for that effort would be to still keep senders and receivers in separate PeerConnections. Which means, you can put more senders in the same PC, and all receivers in another PC, but bot sender and receiver together. This comes from several discussions with other implementors who already worked on multistream, where it came out how SDP negotiation can be quite brittle otherwise.

L.

刘孛

unread,
Oct 10, 2018, 10:56:12 PM10/10/18
to meetecho-janus
    I have try in our libwebrtc based native janus client, send-only and recv-only PeerConnection which created by same PeerConnectionFactory will sharing AudioProcessingModule instance,AEC do works in this case.
     I am not sure about WebRTC javascript object lifecycle , Still need figure out why web browser has different behavior.

在 2018年7月4日星期三 UTC+8下午6:56:20,Lorenzo Miniero写道:
To unsubscribe from this group and all its topics, send an email to meetecho-janu...@googlegroups.com.

Ju Ju

unread,
Oct 13, 2018, 4:50:30 AM10/13/18
to meetecho-janus
Sorry I didn't get what you mean

J-
Reply all
Reply to author
Forward
0 new messages