简体   繁体   English

webRTC视频聊天中的噪音/回声

[英]Noise/Echo in webRTC video chat

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). 我已经使用webRTC和tomcat 7创建了一个应用程序。我能够连接两个客户端进行视频聊天。一个客户端是索尼笔记本电脑,另一个是惠普台式电脑(使用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? 是否可以使用getUserMedia()或PeerConnection()API在java脚本级别解决此回声问题?

I have checked my browser versions both are chrome 28+. 我检查过我的浏览器版本都是chrome 28+。

Please help me out. 请帮帮我。

May this comment help you. 此评论对您有所帮助。 A software recommendation seems the only " simple " solution. 软件推荐似乎是唯一的“ 简单 ”解决方案。 Or settings for Windows >= 7 as explained here . 对于Windows> = 7的设置说明这里

Updated: 更新:

Default volume must be set to " 0 " until remote media stream starts flowing; 默认音量必须设置为“ 0 ”,直到远程媒体流开始流动; use "setTimeout" to wait at least " 1 " second and then set volume back to " 1 ". 使用“setTimeout”等待至少“ 1 ”秒,然后将音量设置回“ 1 ”。

Actually, noise occurs out of "huge-audio" bandwidth which happens as soon as "onaddstream" event fires. 实际上,噪声发生在“巨大音频”带宽之外,一旦“onaddstream”事件触发就会发生。

If you check " audioInputLevel " via " chrome://webrtc-internals " you'll see its value something like " 25000 " as soon as " onaddstream " event fires; 如果您通过“ chrome:// webrtc-internals ”检查“ audioInputLevel ”,只要“ onaddstream ”事件触发,您就会看到它的值类似于“ 25000 ”; however in a few milliseconds later, " audioInputLevel " goes down between 1-and-150 and stays lower. 然而,在几毫秒之后,“ audioInputLevel ”在1到150之间下降并保持较低。

Updated at Jan 12, 2016 更新于2016年1月12日

This doc may help: http://www.slideshare.net/MuazKhan/echo-in-webrtc-why 本文档可能有所帮助: http//www.slideshare.net/MuazKhan/echo-in-webrtc-why

You can even set VoiceActivityDetection:false as SDP-constraints to minimize peer-level echo. 您甚至可以将VoiceActivityDetection:false设置为SDP约束以最小化对等级回声。

避免本地流噪声的解决方案是,只需转到你的html文件,其中元素就在那里,只需添加muted =“muted”。这样可以避免本地流的噪声,直到远程流启动

You should add muted="muted" attribute to video element to which you are streaming local video. 您应该将muted="muted"属性添加到要传输本地视频的video元素。 In this case you will hear the sound of remote peer video, but not your local video. 在这种情况下,您将听到远程对等视频的声音,但不会听到本地视频。

在用于流式传输的视频标签中添加属性muted =“muted”将解决此问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM