【问题标题】:Webrtc audio level goes crazy randomlyWebrtc 音频电平随机发疯
【发布时间】:2020-09-15 11:14:09
【问题描述】:

我有一个远程 Webrtc 端点(基于 libwebrtc),它从脉冲音频接收器监视器产生音频。我可以通过 video 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}

最后 track.getConstraints() 在 Chrome 中返回并清空对象。

我从上面了解到的是,Chrome 支持音频处理取消,但轨道不支持。此刻,我对 webrtc 的音频处理在哪一点(发送或接收)使声音级别变得疯狂感到困惑。

我读到here 说(在 Chrome 中使用文件作为测试输入时)“必须禁用所有音频处理,否则音频会失真 ”。这正是我想要为我的轨道做的事情,不同的是,由于我的轨道是远程的,我没有通过浏览器的 getUserMedia() 获取它。

我已经阅读了很多关于禁用 Webrtc 的音频处理并在生产端和消费端尝试各种方法的信息,但同样的问题仍然随机出现。

您是否知道问题可能出在哪一方(发件人或 Chrome 消费者)?

【问题讨论】:

    标签: webrtc pulseaudio


    【解决方案1】:

    问题出在发送端,与 libwebrtc 无关。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-12-20
      • 1970-01-01
      • 2022-09-27
      • 1970-01-01
      • 2020-07-29
      • 2013-03-12
      相关资源
      最近更新 更多