我有一个远程Webrtc端点(基于libwebrtc),它从脉冲音频接收器监视器产生音频。我可以通过一个视频html标签在Chrome中成功地使用它。我面临的问题是,音频似乎变得“疯狂”了,这意味着音频水平突然变得很高,不可能听到它。
在发送端,我使用它来禁用音频处理:
cricket::AudioOptions options;
options.highpass_filter = false;
options.auto_gain_control = false;
options.noise_suppression = false;
options.echo_cancellation = false;
options.residual_echo_detector = false;
options.experimental_agc = false;
options.experimental_ns = false;
options.typing_detection = false;
rtc::scoped_refptr<webrtc::AudioSourceInterface> source = webrtcFactory->CreateAudioSource(options);
但在接收端(Chrome浏览器),似乎没有办法禁用它。
在Chrome中运行mediaDevices.getSupportedConstraints()返回:
aspectRatio: true
autoGainControl: true
brightness: true
channelCount: true
colorTemperature: true
contrast: true
deviceId: true
echoCancellation: true
exposureCompensation: true
exposureMode: true
exposureTime: true
facingMode: true
focusDistance: true
focusMode: true
frameRate: true
groupId: true
height: true
iso: true
latency: true
noiseSuppression: true
pointsOfInterest: true
resizeMode: true
sampleRate: true
sampleSize: true
saturation: true
sharpness: true
torch: true
whiteBalanceMode: true
width: true
zoom: true
然后在Chrome中运行track.getCapabilities()返回:
autoGainControl: [false]
deviceId: "7254143d-7c85-4567-9d95-94f2c79060fe"
echoCancellation: [false]
noiseSuppression: [false]
sampleSize: {max: 16, min: 16}
最后,Chrome中的track.getConstraints()返回和空对象。
我从上面了解到,Chrome支持音频处理取消,但音轨不支持。此时,我对webrtc的音频处理在哪一点(发送或接收)使声音级别变得疯狂感到困惑。
我读过这里,当使用一个文件作为Chrome的测试输入时,“所有的音频处理必须被禁用,否则音频将被扭曲”。这也正是我想为我的轨道所做的,区别在于,由于我的轨道是远程的,所以我不能通过浏览器的getUserMedia()获得它。
我读了很多关于禁用Webrtc的音频处理和在生产和消费方面尝试各种事情的文章,但是同样的问题仍然随机出现。
你知道问题出在哪一边(发件人还是Chrome消费者)吗?
发布于 2020-05-28 08:59:10
问题在发送方,与libwebrtc无关。
https://stackoverflow.com/questions/62059616
复制相似问题