5

I have created an application using webRTC and tomcat 7. I am able to connect two client for video chat.one client is in sony laptop and other is in HP desktop PC(with Logitech webCam). Video is working fine but audio is generating too much echo. I have google multiple times but i didn't found any solution.

Can this echo problem be resolved at java script level using getUserMedia() or PeerConnection() APIs?

I have checked my browser versions both are chrome 28+.

Please help me out.

user1249068
  • 61
  • 1
  • 3

4 Answers4

1

May this comment help you. A software recommendation seems the only "simple" solution. Or settings for Windows >= 7 as explained here.

Updated:

Default volume must be set to "0" until remote media stream starts flowing; use "setTimeout" to wait at least "1" second and then set volume back to "1".

Actually, noise occurs out of "huge-audio" bandwidth which happens as soon as "onaddstream" event fires.

If you check "audioInputLevel" via "chrome://webrtc-internals" you'll see its value something like "25000" as soon as "onaddstream" event fires; however in a few milliseconds later, "audioInputLevel" goes down between 1-and-150 and stays lower.

Updated at Jan 12, 2016

This doc may help: http://www.slideshare.net/MuazKhan/echo-in-webrtc-why

You can even set VoiceActivityDetection:false as SDP-constraints to minimize peer-level echo.

Muaz Khan
  • 7,138
  • 9
  • 41
  • 77
  • I have tried but still echo is there. When I m testing the same end points(peer endpoints) with the online hosted server at https://apprtc.appspot.com. no noise or echo is there. – user1249068 Aug 11 '13 at 04:06
  • I have tested it as: Initially volume= mute for both client. client1 started and video displayed. Client2 accept the request from Client1 and video swaped between these two. Now i increased the volume of both clients. – user1249068 Aug 13 '13 at 11:14
  • I have tested it as: Initially volume as mute for both client. client1 started and video displayed. Client2 accept the request from Client1 and video swaped between these two. Now I increased the volume of both clients. Result again the same,too much echo and Noise. – user1249068 Aug 13 '13 at 11:21
  • This did it for me: http://stackoverflow.com/questions/18406193/how-to-avoid-echo-and-noise-in-javascript-for-webrtc – aclave1 Jan 12 '16 at 15:50
0

the solution to avoid the local stream noise is,just go to your html file where the element is there and just add muted="muted".This will avoid the noise of local stream till the remote stream is started

0

You should add muted="muted" attribute to video element to which you are streaming local video. In this case you will hear the sound of remote peer video, but not your local video.

Seymur
  • 91
  • 2
  • 9
0

adding attribute muted="muted" in video tag which is used for streaming will resolve this problem.

Shubham
  • 1,740
  • 1
  • 15
  • 17