New issue
Advanced search Search tips

Issue 676869 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

Opus multichannel decoding fails for 11 channels

Reported by james.jd...@gmail.com, Dec 24 2016

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36

Steps to reproduce the problem:
Use the following HTML body and click the 'play' control:

  <audio controls>
      <source src="http://band.bittwiddlers.org/mp3/cuts/2016-12-14/raw/01%20-%20Hash%20Pipe.opus" type="audio/ogg">
  </audio>

The decoding immediately fails and cancels the media load because the channel count is 11, higher than the apparent allowable maximum of 8.

The example src href is a publicly available, validly encoded 11-channel Opus audio file encoded by the opusenc tool as part of opus-tools-0.1.9-win32.

For comparison, swap out the source element for this test Opus file encoded with 8 channels:

   <source src="http://band.bittwiddlers.org/mp3/cuts/2016-12-14/raw/test8.ogg" type="audio/ogg">

This 8-channel Opus file works because it coincidentally maps to a standard 7.1 speaker configuration, whereas my 11-channel example above does not, and should not have to (see additional comments for rationale).

Using opusenc opus-tools 0.1.9 (using libopus 1.1)
Copyright (C) 2008-2013 Xiph.Org Foundation

What is the expected behavior?
Decoding of an 11-channel Opus audio source should succeed and I should be able to use Web Audio API to split out the 11 channels and process them individually.

What went wrong?
Decoding fails and no sample data is available through Web Audio API because Chrome expects the number of channels in an audio source to conform to de-facto speaker configuration channel counts. Since Chrome does not expect channel counts higher than 8 (for a 7.1 surround system) decoding fails. The presumption that the application decoding audio is going to send the audio stream directly to playback and therefore MUST conform to an expected speaker configuration is invalid.

Did this work before? No 

Does this work in other browsers? N/A

Chrome version: 55.0.2883.87  Channel: stable
OS Version: 10.0
Flash Version: Shockwave Flash 24.0 r0

I'm trying to develop a very minimal Web Audio API-based DAW centered on the idea of using a single multi-channel audio file where the channels are used directly as independent audio tracks. I chose Opus as the ideal codec because it allows for up to 256 channels to be encoded into a single file and does not specify that channels should be mapped to any kind of speaker configuration (which I believe is the proper design decision).

Chrome conflates audio source channel count with speaker configurations and will only allow audio sources with channel counts that match expected speaker configurations that Chrome is programmed to know about. Granted this makes sense in the simplest streaming playback case, but I don't believe that decoding should fail in the event an unrecognized channel count is encountered. This should be where the strength of the Web Audio API should shine. It should be flexible enough to encounter any sort of audio source without the conflation of speaker configuration involved.

In case it wasn't obvious, I plan to use a ChannelSplitterNode to extract out each channel independently as a mono AudioNode and recombine them into a final stereo mix after individual track processing.

I should not have to trim back the number of channels to 8 just because a 7.1 speaker configuration is the most that Chrome is designed to handle in the simplest stream-to-playback case.

Please support audio sources with up to 256 channels without failing decoding. I don't see any limitations of Web Audio API that would prevent this. If there are, we should work to remove such unnecessary limitations.
 
Labels: TE-NeedsTriageHelp
Cc: dalecur...@chromium.org
Components: -Blink>Media Internals>Media>Audio
Labels: -Pri-2 Pri-3
Status: Available (was: Unconfirmed)
We don't have support for discrete layouts coming out of the decoder. It's possible this just needs a simple fix to allow the channel counts and fix all the places where we explicitly disallow CHANNEL_LAYOUT_DISCRETE.

Comment 4 by flim@chromium.org, Aug 14 2017

Labels: M-62
Status: Fixed (was: Available)
We've just added support for rendering > 8 channels if a Web Audio renderer is used:

https://chromium-review.googlesource.com/c/606678

Sign in to add a comment