google / ExoPlayer

This project is deprecated and stale. The latest ExoPlayer code is available in https://github.com/androidx/media
https://developer.android.com/media/media3/exoplayer
Apache License 2.0
21.7k stars 6.01k forks source link

Add Dolby AC-4 audio channel configuration to DASH manifest parser #10464

Open RicFlinn opened 2 years ago

RicFlinn commented 2 years ago

Dolby AC-4 audio, used in ATSC-3 broadcasts, includes an alternate AudioChannelConfiguration schemeIdUri that is currently not parsed, for example:

<AudioChannelConfiguration schemeIdUri="tag:dolby.com,2015:dash:audio_channel_configuration:2015" value="800000"/>

This is defined (sort of) in DASH-IF IOP for ATSC-3 section 5.4.4.2.1, which references TS 103 190-2 - V1.2.1 - Digital Audio Compression (AC-4) Standard, section G.3.1.

It mostly maps to "urn:mpeg:mpegB:cicp:ChannelConfiguration" (which is still the recommended scheme), but dolby.com:2015 adds a poorly-defined object-based audio option, which I guess lets the A/V receiver figure out how to stream the audio to the available surround channels.

I'm not sure if I can provide a test stream; I've seen this scheme used in live ATSC-3 signals, but mainly in Dolby MS12 test streams, which I'm not able to share.

ojw28 commented 2 years ago

@ybai001 - If this is Dolby defined, is it something you'd be able to send a pull request to address?

ybai001 commented 2 years ago

@ybai001 - If this is Dolby defined, is it something you'd be able to send a pull request to address?

@ojw28 - This is actually Dolby defined. I need to check with related content creation team at first. Then decide whether/how to solve it. Stay tuned.

ybai001 commented 2 years ago

@ojw28 The internal discussion is still on-going.

ybai001 commented 2 years ago

@ojw28 , @RicFlinn We have some updates for you today.

  1. For the provided example in original question, <AudioChannelConfiguration schemeIdUri="tag:dolby.com,2015:dash:audio_channel_configuration:2015" value="800000"/>, this schemeIdUri "tag:dolby.com,2015:dash:audio_channel_configuration:2015" is used for AC-4 content. We (Dolby) will provide a pull request to support this schemeIdUri.
  2. For the specific value "800000", it means object-based audio. Considering current ExoPlayer/Android devices don't support object-based audio, we plan to simply set audioChannels = Format.NO_VALUE; Does it make sense for you?
tonihei commented 2 years ago

@ybai001 Thanks for looking into this!

We (Dolby) will provide a pull request to support this schemeIdUri.

Sounds good, thanks!

Considering current ExoPlayer/Android devices don't support object-based audio, we plan to simply set audioChannels = Format.NO_VALUE; Does it make sense for you?

I'm not entirely sure this works because ExoPlayer will still see this as an audio track and will assume it can be played even if the number of channels is unknown. To avoid that this track is selected for playback, we need to make sure the audio renderer knows that this track is unsupported.

ybai001 commented 2 years ago

Considering current ExoPlayer/Android devices don't support object-based audio, we plan to simply set audioChannels = Format.NO_VALUE; Does it make sense for you?

I'm not entirely sure this works because ExoPlayer will still see this as an audio track and will assume it can be played even if the number of channels is unknown. To avoid that this track is selected for playback, we need to make sure the audio renderer knows that this track is unsupported.

Object-based audio is an ecosystem topic. There are lots of things to be done. As far as track selection, Dolby's plan is to define a new mimetype for AC-4 object audio so that ExoPlayer can't find matched codec for this track then this track will not be selected.

tonihei commented 2 years ago

Dolby's plan is to define a new mimetype for AC-4 object audio so that ExoPlayer can't find matched codec for this track then this track will not be selected.

That sounds like a good plan, thanks.

ybai001 commented 2 years ago

@tonihei , the patch (to support this schemeIdUri) is in internal review phase. After that, we will submit it as pull request.