Echo cancellation on static video

56 views
Skip to first unread message

Dan Briggs

unread,
Apr 4, 2019, 12:06:44 PM4/4/19
to discuss-webrtc
WebRTC does a good job of echo cancellation when the audio is coming from a remote peer.  Is it also possible to cancel echo from a static video playing from my speakers?

For example, say I use a <video /> tag to play a static video by setting the src attribute. Then I play the audio through my speakers. If I capture my mic, it will pick up the audio from my speakers. If the audio was coming from a remote peer and not a static video, it would be echo cancelled. Is it possible to get echo cancellation on the static video as well?

It's possible by rendering a hidden/muted static video, calling captureStream(), creating a peer connection with myself, then playing the remote stream. But that's pretty ugly... Is there a cleaner way to tell WebRTC to echo cancel the audio?


valer

unread,
Apr 7, 2019, 2:37:14 AM4/7/19
to discuss-webrtc
I think you should build your own wrapper to WebRTC to do this. A good wrapper is a virtual audio device. For example, take a look at solicall pro. This noise reduction and echo cancellation application is using a virtual audio device which provide you the flexibility you are looking for. As long as the played audio is going via the SoliCall Audio Device and the captured audio is going via SoliCall Audio device, echo cancellation will be performed on the captured audio.

Dan Briggs

unread,
Apr 10, 2019, 10:04:49 AM4/10/19
to discuss-webrtc
@valer That's an interesting idea! My solution needs to be entirely browser-based so I'm not sure I'll be able to make a virtual audio device. Is there a way to do something similar in the browser?

valer

unread,
Apr 11, 2019, 1:17:14 AM4/11/19
to discuss-webrtc
Interesting question. I am not sure because you need to have something installed in the driver level to enable capturing the audio.
Reply all
Reply to author
Forward
0 new messages