Chrome WebRTC echo cancellation and external audio sources
Asked Answered
B

2

9

I'm building a video conferencing app using Electron (version 10, Chrome v75) and WebRTC. The app has multiple windows, and in each window, I have a separate RTCPeerConnection with a different app user. The problem is that if I don't use headphones, there is a strong echo that makes the app almost unusable.

I tried setting all sorts of getUserMedia options like echoCancellation: true or googEchoCancellation: true, echoCancellationType: "browser"/"system", but none of them managed to cancel out the echo from various sound sources.

This problem appears only on Mac and Linux, while Windows suppresses the echo quite efficiently.

I found this Chromium issue that describes a similar problem in more detail.

Also, when I try out this Fiddle on Chrome + Mac or Linux (although Chrome is not perfect for this very case, find more details here), I see no effects of echo cancellation and the echo is still there. However, the same thing on Chrome + Windows or Firefox + any OS works perfectly.

Can it really be that AEC (echo cancellation) within Chrome does not take into account all sound sources, and does anyone know a workaround?

Bastogne answered 18/11, 2020 at 8:16 Comment(1)
Did you ever resolve this? It's interesting how different firefox/chrome are!Shewchuk
A
0

add video.volume = 0 to access camera and when you start recording. It works for me

Andes answered 21/8, 2021 at 9:19 Comment(0)
S
0

I'm not sure if I'm answering your question but: Chrome/Firefox do not take into account all sound sources. Chrome handles only RTCPeerConnection audio tracks. And I think not between tabs.

Perhaps I'm misreading your question though, because you seem to think Windows works fine. But maybe Chrome is using some native Windows echo cancellation feature?

Related links:

Shewchuk answered 28/7, 2022 at 19:54 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.