Stereo mode and aec in webrtc: why only monaural audio?

26 views
Skip to first unread message

Hauke Krüger

unread,
Jun 6, 2022, 2:50:00 PMJun 6
to discuss-webrtc
Hi,

I have a small app in chrome, latest version (102) that opens the userMedia and connects the input to an audio/video renderer - very simple and no connection involved yet. The constraints are:

"video" -> <deviceId>
"audio" ->
   "sampleSize" -> 16
   "channelCount" -> 2
   "sampleRate" -> 48000
   "echoCancellation" -> false
   "autoGainControl" -> false
   "noiseSuppression" -> false
   "deviceId" -> "default"

This app outputs the input signal in stereo quality - just as expected.
And if I connect this peer to peer, the transmitted signal is - of course - also stereo.

If now using the constraints

"video" -> <deviceId>
"audio" ->
   "sampleSize" -> 16
   "channelCount" -> 2
   "sampleRate" -> 48000
   "echoCancellation" -> true
   "autoGainControl" -> false
   "noiseSuppression" -> false
   "deviceId" -> "default"

the sound is no longer stereo but monaural even though the input device produces stereo signals as before. This is unexpected.
And if I connect this peer to peer, the transmitted signal is - of course - also mono.

The chrome://webrtc-internals confirms that the constraints are applied properly.

How can I achieve that even with AEC active stereo is processed? Is the observed behavior - either stereo + no AEC OR AEC + Monaural -  a bug or a feature?
I run the web app from localhost. Could the non-stereo output be due to not using https?

Any help is greatly appreciated. Thank you and best regards


Reply all
Reply to author
Forward
0 new messages