w3c / mediacapture-extensions

Extensions to Media Capture and Streams by the WebRTC Working Group
https://w3c.github.io/mediacapture-extensions/
Other
19 stars 15 forks source link

MediaTrackSettings lacks support of channel layout #3

Open henrikand opened 5 years ago

henrikand commented 5 years ago

Current specification supports channelCount

https://rawgit.com/w3c/mediacapture-main/master/getusermedia.html#def-constraint-channelCount

but this is not sufficient when the track contains more than two channels. In those cases, a channelLayout is also required [1].

[1] https://en.wikipedia.org/wiki/Surround_sound

armax00 commented 5 years ago

Sorry mistakenly clicked on the wrong thing.

alvestrand commented 5 years ago

This seems to be one of the aspects that need to be solved for 5.1/7.1 audio in WebRTC.

alvestrand commented 5 years ago

Need to sync with the OPUS definition.

henbos commented 4 years ago

This is my current understanding after having talked with @henrikand:

The implementation's channel count and layout is tied to WebAudio, see its channelInterpretation. The number of channels seem to map to a specific channel layout, e.g. 6 channels = "5.1" = L, R, C, LFE, SL, SR. You couldn't have a different layout with the same number of channels. In a WebAudio context, a channel count higher than 6 is not supported.

As a consequence, the existing MediaStreamTrackSettings.channelCount is enough to figure out the channel layout (it just needs to be implemented by browsers or else you have to look up the channel count with WebAudio). Separating channel count and channel layout seem to be a larger issue to tackle. I'm removing the TPAC label since I don't have a concrete suggestion here.

We may consider ice-boxing this issue unless we find stronger incentive to have a more expressive channel layout?