Skip to content

Dolby <AudioChannelConfiguration value="F800"> results in an exception #688

Closed

Description

@dimitar71

Version

Media3 1.1.1

More version details

All Exoplayer 2.18.7+ versions have this problem.

Devices that reproduce the issue

  • Chromecast
  • Nvidia Shield
  • Sony TV with Android TV
  • majority of Android TV-related boxes

Devices that do not reproduce the issue

  • Mobile-related devices, e.g. Pixel phones

Reproducible in the demo app?

Not tested

Reproduction steps

Find a schemeIdUri="tag:dolby.com,2014:dash:audio_channel_configuration:2011" manifest which value is not one of the supported ones in DashManifestParser.parseDolbyChannelConfiguration():

  • "4000" - 1 audio channel
  • "a000" - 2 audio channels
  • "f801" - 6 audio channels
  • "fa01" - 8 audio channels

For example value="F800" in:
<AudioChannelConfiguration schemeIdUri="tag:dolby.com,2014:dash:audio_channel_configuration:2011" value="F800"></AudioChannelConfiguration>

Expected result

A good approach would be parsing and returning a valid number, not Format.NO_VALUE.

Actual result

This results in a 100% reproducible IllegalArgumentException from within Exoplayer.

This may need to be parsed properly, and return a safe audio channels value by default, e.g. 2.
Also, it is a good idea to be properly documented in the Exoplayer documentation/references.

For us, F800 defines 5-channel audio.

Based on https://ott.dolby.com/OnDelKits/DDP/Dolby_Digital_Plus_Online_Delivery_Kit_v1.5/Documentation/Content_Creation/SDM/help_files/topics/ddp_mpeg_dash_c_mpd_auchlconfig.html, Alternative AudioChannelConfiguration scheme section:

The value element is a four-digit hexadecimal representation of the 16-bit bit field, which describes the channel assignment of the referenced Dolby Digital Plus bitstream according to the table. Bit 0, which indicates the presence of the L channel, is the most-significant bit of the AudioChannelConfiguration descriptor.

This means any value, not just above 4 would be valid.

Also, in DashManifestParser.parseDolbyChannelConfiguration(), the coverage is 1, 2, 6 and 8 audio channels.
It does not cover 5 and 7 audio channels for example.

One option would be checking range of values rather one value per channel configuration.

Media

<?xml version="1.0" encoding="UTF-8"?>
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" profiles="urn:mpeg:dash:profile:isoff-live:2011" xmlns:cenc="urn:mpeg:cenc:2013" type="dynamic" availabilityStartTime="1970-01-01T00:00:00Z" publishTime="2023-09-30T06:30:19Z" minimumUpdatePeriod="PT2S" minBufferTime="PT2S" timeShiftBufferDepth="PT21600S">
<Period id="id_PT1695835287S" start="PT1695835287.000S">
  <AdaptationSet id="0" mimeType="video/mp4" contentType="video" segmentAlignment="true" startWithSAP="1">
  <ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="1419d680-1dd2-11b2-8054-024152444953"/>
  <ContentProtection value="Widevine" schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed">
  <cenc:pssh>AAAAOHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAABgSEBQZ1oAd0hGygFQCQVJESVNI49yVmwY=</cenc:pssh>
  </ContentProtection>
    <SegmentTemplate presentationTimeOffset="16958352870000555" timescale="10000000" initialization="h_0803afc9add619e106d0f7ace2467f0ae1_$RepresentationID$_$Bandwidth$_t16958352870000555_init.mp4?device_profile=dash_cenc_verimatrix%26seg_size=2" media="h_0803afc9add619e106d0f7ace2467f0ae1_$RepresentationID$_$Bandwidth$_t$Time$.mp4?device_profile=dash_cenc_verimatrix%26seg_size=2">
      <SegmentTimeline>
        <S d="20020000" t="16960535977927555" r="899"/>
      </SegmentTimeline>
    </SegmentTemplate>
    <Representation id="video_0" bandwidth="5240000" width="1280" height="720" codecs="avc1.640020" scanType="progressive"></Representation>
    <Representation id="video_1" bandwidth="2880000" width="960" height="540" codecs="avc1.64001F" scanType="progressive"></Representation>
    <Representation id="video_2" bandwidth="2060000" width="854" height="480" codecs="avc1.4D401F" scanType="progressive"></Representation>
    <Representation id="video_3" bandwidth="1400000" width="640" height="360" codecs="avc1.4D401E" scanType="progressive"></Representation>
    <Representation id="video_4" bandwidth="980000" width="480" height="270" codecs="avc1.42E015" scanType="progressive"></Representation>
    <Representation id="video_5" bandwidth="580000" width="320" height="180" codecs="avc1.42E00D" scanType="progressive"></Representation>
    <Representation id="video_6" bandwidth="3700000" width="1280" height="720" codecs="avc1.64001F" scanType="progressive"></Representation>
  </AdaptationSet>
  <AdaptationSet id="1" mimeType="audio/mp4" contentType="audio" lang="en" segmentAlignment="true" startWithSAP="1">
    <AudioChannelConfiguration schemeIdUri="tag:dolby.com,2014:dash:audio_channel_configuration:2011" value="F800"></AudioChannelConfiguration>
  <ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="1419d680-1dd2-11b2-8054-024152444953"/>
  <ContentProtection value="Widevine" schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed">
  <cenc:pssh>AAAAOHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAABgSEBQZ1oAd0hGygFQCQVJESVNI49yVmwY=</cenc:pssh>
  </ContentProtection>
    <SegmentTemplate presentationTimeOffset="16958352870000555" timescale="10000000" initialization="h_0803afc9add619e106d0f7ace2467f0ae1_$RepresentationID$_$Bandwidth$_t16958352870000555_init.mp4?device_profile=dash_cenc_verimatrix%26seg_size=2" media="h_0803afc9add619e106d0f7ace2467f0ae1_$RepresentationID$_$Bandwidth$_t$Time$.mp4?device_profile=dash_cenc_verimatrix%26seg_size=2">
      <SegmentTimeline>
        <S d="22400000" t="16960535979733777" r="1"/>
        <S d="15680000" t="16960553901973777"/>
        <S d="22400000" t="16960553917653777" r="1"/>
        <S d="15680000" t="16960553962453777"/>
        <S d="22400000" t="16960553978133777"/>
      </SegmentTimeline>
    </SegmentTemplate>
    <Representation id="audio1299_0" bandwidth="400000" codecs="ac-3" audioSamplingRate="48000"></Representation>
  </AdaptationSet>
  <AdaptationSet id="2" mimeType="audio/mp4" contentType="audio" lang="en" segmentAlignment="true" startWithSAP="1">
    <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"></AudioChannelConfiguration>
  <ContentProtection schemeIdUri="urn:mpeg:dash:mp4protection:2011" value="cenc" cenc:default_KID="1419d680-1dd2-11b2-8054-024152444953"/>
  <ContentProtection value="Widevine" schemeIdUri="urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed">
  <cenc:pssh>AAAAOHBzc2gAAAAA7e+LqXnWSs6jyCfc1R0h7QAAABgSEBQZ1oAd0hGygFQCQVJESVNI49yVmwY=</cenc:pssh>
  </ContentProtection>
    <SegmentTemplate presentationTimeOffset="16958352870000555" timescale="10000000" initialization="h_0803afc9add619e106d0f7ace2467f0ae1_$RepresentationID$_$Bandwidth$_t16958352870000555_init.mp4?device_profile=dash_cenc_verimatrix%26seg_size=2" media="h_0803afc9add619e106d0f7ace2467f0ae1_$RepresentationID$_$Bandwidth$_t$Time$.mp4?device_profile=dash_cenc_verimatrix%26seg_size=2">
      <SegmentTimeline>
        <S d="23466666" t="16960535978227111"/>
        <S d="11733333" t="16960553784627111"/>
        <S d="23466667" t="16960553796360444"/>
        <S d="23466666" t="16960553819827111"/>
        <S d="14080000" t="16960553843293777"/>
        <S d="23466667" t="16960553857373777" r="1"/>
        <S d="11733333" t="16960553904307111"/>
        <S d="23466667" t="16960553916040444"/>
        <S d="23466666" t="16960553939507111"/>
        <S d="14080000" t="16960553962973777"/>
        <S d="23466667" t="16960553977053777"/>
      </SegmentTimeline>
    </SegmentTemplate>
    <Representation id="audio1300_0" bandwidth="100000" codecs="mp4a.40.2" audioSamplingRate="48000"></Representation>
  </AdaptationSet>
  <AdaptationSet id="3" mimeType="video/mp4" contentType="video" segmentAlignment="true" startWithSAP="1">
   <EssentialProperty schemeIdUri="http://dashif.org/guidelines/trickmode" value="0" />
    <SegmentTemplate presentationTimeOffset="16958352870000555" timescale="10000000" initialization="h_0803afc9add619e106d0f7ace2467f0ae1_$RepresentationID$_$Bandwidth$_t16958352870000555_init.mp4?device_profile=dash_cenc_verimatrix%26seg_size=2" media="h_0803afc9add619e106d0f7ace2467f0ae1_$RepresentationID$_$Bandwidth$_t$Time$.mp4?device_profile=dash_cenc_verimatrix%26seg_size=2">
      <SegmentTimeline>
        <S d="20020000" t="16960535977927555" r="899"/>
      </SegmentTimeline>
    </SegmentTemplate>
    <Representation id="trk_0" bandwidth="753000" maxPlayoutRate="16" codingDependency="false" width="1280" height="720" codecs="avc1.64001F" frameRate="19/30" scanType="progressive"></Representation>
  </AdaptationSet>
</Period>
<UTCTiming schemeIdUri="urn:mpeg:dash:utc:direct:2014" value="2023-09-30T06:29:57Z"/>
</MPD>

Bug Report

Activity

  1. SerkanKUL commented on Sep 30, 2023

    @SerkanKUL

    I am experiencing the same problem. In which files do I need to make code changes?

  2. dimitar71 commented on Oct 2, 2023

    @dimitar71
    Author
    • please look at DashManifestParser.parseDolbyChannelConfiguration()
    • you can override DashManifestParser.parseAudioChannelConfiguration()
    • and call your own method with more values for the specific case "urn:dolby:dash:audio_channel_configuration:2011".

    However, I still think Exoplayer sets very stiff boundaries for audio channels in its current implementation.

  3. self-assigned this
    on Oct 11, 2023
  4. tianyif commented on Oct 11, 2023

    @tianyif
    Contributor

    Hi @dimitar71,

    Thanks for reporting! Could you please provide the full details of the sample media which will help me to test the change? The pasted one is an encrypted stream, and I think we'd need a drm license uri to test it.

    If you're unable to share test content publicly, please send them to dev.exoplayer@gmail.com using a subject in the format "Issue #688". Please also update this issue to indicate you’ve done this.

  5. tianyif commented on Oct 12, 2023

    @tianyif
    Contributor

    Correction to the email, the one above is a legacy one: please send the test content to android-media-github@google.com using a subject in the format "Issue #688".

  6. SerkanKUL commented on Oct 13, 2023

    @SerkanKUL

    issues/688 I sent an email no. On most phones, ac3 and eac3 do not produce sound. Video plays but no sound

  7. tianyif commented on Oct 16, 2023

    @tianyif
    Contributor

    Hi @radyoof,

    Not sure if I understood your last comment correctly. So you said you sent an email? But I didn't find anything related in our email box.

  8. dimitar71 commented on Oct 16, 2023

    @dimitar71
    Author

    @tianyif
    We are still trying to get that details. Will let you know soon.

    @radyoof
    I am not sure what issue you are referring.
    Seems is different, and this moves the focus away from this specific problem.

  9. lsalvalaggio commented on Oct 24, 2023

    @lsalvalaggio

    @tianyif -- please use this URL for testing the issue with Dolby Audio configuration representing the F800 scenario:

    --Update - on second thought not going to share that publicly as it's in the clear. Will send to suggested email with desired subject line.

  10. tianyif commented on Nov 13, 2023

    @tianyif
    Contributor

    Thanks @lsalvalaggio for the test media. The change is pushed :)

  11. locked and limited conversation to collaborators on Jan 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions