Enable audio passthrough

757 views
Skip to first unread message

Torsten Blindert

unread,
Jan 25, 2015, 6:13:49 PM1/25/15
to chromi...@chromium.org
Hey,

my goal is to create a custom chromium build that is capable of passing through audio without downmixing. 
I've already managed to build a custom ffmpeg so that video streams with dts audio play as expected, but chromium seems to downmix the audio stream to stereo.

The perfect solution for me would be a high level javascript api so that I could switch between passthrough and PCM at runtime, but a hacky alternative would do it for now ;)

Could someone help me with this or point me in the right direction? 

Thanks in advance

Tommi

unread,
Jan 26, 2015, 4:39:39 AM1/26/15
to torsten....@me.com, chromi...@chromium.org
Can you add a bit more context to what you're trying to do?  Is this WebRTC related?

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

Torsten

unread,
Jan 26, 2015, 4:55:33 AM1/26/15
to chromi...@chromium.org, torsten....@me.com
I'm trying to build a media player based on chromium.
I've changed the ffmpeg and some files in the media folder to make this possible:

<video>
 
<source src="video.mkv"type="video/x-matroska">
</video>

My test video has one DTS audio stream. 
Playing this video in e.g. VLC passes through the encoded audio to my sound system which correctly shows dts as source and decodes it.
Playing this video in my modified chromium version I only receive a decoded stereo stream... so somewhere in chrome the dts audio stream has to be downmixed / resampled.
It would be awesome to be able to control this behavior. 

After some googling I found the chrome flag "--disable-audio-output-resampler" ... but this does nothing to chromium (and I found ne reference of this in the source code either).

Hopefully it's a little bit clearer right now... 
and it has nothing to do with web realtime communication.

Sergiy Byelozyorov

unread,
Jan 26, 2015, 9:10:41 AM1/26/15
to torsten....@me.com, chromi...@chromium.org

Dale Curtis

unread,
Jan 26, 2015, 1:56:52 PM1/26/15
to ser...@chromium.org, torsten....@me.com, Chromium-dev
This shouldn't be too difficult to do, but it will likely be quite a bit of work. You'll need to:
- Introduce a new AudioParameters::Format to signal this throughout the pipeline.
- Extend media::AudioBus to support transport of passthrough data from the renderer to the browser.
- Change all the platform level AudioOuputStream drivers to support this passthrough mechanism.

You'll want to look at the AudioRendererSink and AudioOutputStream interfaces as well as their implementations.

- dale

Torsten

unread,
Jan 26, 2015, 4:21:35 PM1/26/15
to chromi...@chromium.org, ser...@chromium.org, torsten....@me.com
Thanks Dale!
Is there some documentation of that? I've looked through the source code and I don't really get hang of it. 

Dale Curtis

unread,
Jan 26, 2015, 4:51:08 PM1/26/15
to torsten....@me.com, Chromium-dev, ser...@chromium.org
You can get a gist of things at http://www.chromium.org/developers/design-documents/video -- it's a bit out of date though, so there are some additional abstraction layers for audio. The key pieces you should look at though are:

Transport mechanism:

Browser side interface:

Clicking on the class name in code search will show you various implementations of each of those interfaces.

- dale
Reply all
Reply to author
Forward
0 new messages