W3C home > Mailing lists > Public > public-audio@w3.org > October to December 2016

Re: Multichannel files and ChannelSplitter channel layout issue

From: Hongchan Choi <hongchan@google.com>
Date: Thu, 17 Nov 2016 18:52:18 +0000
Message-ID: <CAGJqXNv5mXq-MD4c=ss0C_GOH0X0907nT1+Q3YTMd5oxb2U9bw@mail.gmail.com>
To: Vincent Jousse <contact@ftsoftware.fr>, public-audio@w3.org
Hello,

I discovered the same issue - the multichannel audio decoding in Chrome and
Safari producing different results. To solve this issue, Omnitone uses a
router object:
https://github.com/GoogleChrome/omnitone#foarouter

The FOARouter is a simple collection of 1 splitter and 1 merger. It can
dynamically remap the channel layout when it's needed.

It's not ideal that you have to sniff the browser and have a different code
path, but there is not much we can do. Chrome decodes the file with the
built-in FFMPEG, but Safari uses the OS-provided decoder. The spec does not
mandate the channel layout order yet so it is entirely up to the browser
implementors.

FWIW, I believe the channel layout is should be a part of HTMLMediaElement,
not the Web Audio API.

-Hongchan

On Thu, Nov 17, 2016 at 10:42 AM Vincent Jousse <contact@ftsoftware.fr>
wrote:

> Hi,
>
> I’ve just created a simple audio graph with a MediaElementAudioSourceNode
> connected to ChannelSplitterNode with 6 outputs. The MediaElement's source
> is a multichannel (5.1) m4a file.
> Only the first ChannelSplitterNode’s output is connected to the audio
> context’s AudioDestinationNode.
> I get different behaviors on Chrome and Safari : Chrome plays the
> front-left channel whereas Safari plays the front-center channel.
>
> Is there anyway to « normalize » the channel splitter behavior ? Or should
> I create a bug on the WebAudioAPI to block the channel order as it is done
> for the up/down mixing ?
>
> Vincent
>
>
>
>
>
Received on Thursday, 17 November 2016 18:53:01 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 17 November 2016 18:53:01 UTC