Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DASH: Missing Variant Tracks for Audio Representations in a Single AdaptationSet #5858

Closed
snematoda opened this issue Nov 5, 2023 · 3 comments · Fixed by #5859 or #5869
Closed

DASH: Missing Variant Tracks for Audio Representations in a Single AdaptationSet #5858

snematoda opened this issue Nov 5, 2023 · 3 comments · Fixed by #5859 or #5869
Assignees
Labels
priority: P1 Big impact or workaround impractical; resolve before feature release status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@snematoda
Copy link

snematoda commented Nov 5, 2023

Have you read the FAQ and checked for duplicate open issues?
Yes

If the problem is related to FairPlay, have you read the tutorial?

Unrelated

What version of Shaka Player are you using?

4.5.0 (debug)

Can you reproduce the issue with our latest release version?
Yes

Can you reproduce the issue with the latest code from main?
Yes

Are you using the demo app or your own custom app?
Demo

If custom app, can you reproduce the issue using our demo app?
Yes

What browser and OS are you using?
Brave on Fedora

For embedded devices (smart TVs, etc.), what model and firmware version are you using?
Unrelated

What are the manifest and license server URIs?

Server URL: https://cwip-shaka-proxy.appspot.com/no_auth

What configuration are you using? What is the output of player.getConfiguration()?

{
  manifest: {
    disableVideo: true,
    disableText: true,
    disableThumbnails: true
  }
}

What did you do?
Playing a MPD (https://storage.googleapis.com/shaka-demo-assets/angel-one-widevine/dash.mpd), with multiple representations in a single adaptation set (of id 5 and 10 in this case)

https://shaka-player-demo.appspot.com/demo/#audiolang=en-US;textlang=en-US;disableVideo=true;disableText=true;uilang=en-US;asset=https://storage.googleapis.com/shaka-demo-assets/angel-one-widevine/dash.mpd;panel=CUSTOM%20CONTENT;build=debug_compiled

What did you expect to happen?

player.getVariantTracks().map(i => i.originalAudioId)

To return variants with both 5 and 10 audio ids

What actually happened?

Here is an extract from the mpd

<AdaptationSet id="5" contentType="audio" lang="en" subsegmentAlignment="true">
  <ContentProtection value="cenc" schemeIdUri="urn:mpeg:dash:mp4protection:2011" cenc:default_KID="...."/>
  <ContentProtection schemeIdUri="urn:uuid:....">
    <cenc:pssh>.....</cenc:pssh>
  </ContentProtection>
  <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"/>
  <Representation id="5" bandwidth="135088" codecs="mp4a.40.2" mimeType="audio/mp4" audioSamplingRate="48000">
     <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
     <BaseURL>a-eng-0128k-aac-2c.mp4</BaseURL>
     <SegmentBase indexRange="1042-1253" timescale="48000">
       <Initialization range="0-1041"/>
     </SegmentBase>
   </Representation>
   <Representation id="10" bandwidth="392386" codecs="mp4a.40.2" mimeType="audio/mp4" audioSamplingRate="48000">
     <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="6"/>
     <BaseURL>a-eng-0384k-aac-6c.mp4</BaseURL>
     <SegmentBase indexRange="1042-1253" timescale="48000">
       <Initialization range="0-1041"/>
     </SegmentBase>
   </Representation>
</AdaptationSet>

Only the lowest audio quality (of id 5) is available in getVariantTracks(), the higher audio quality (of id 10) is not utilized

@snematoda snematoda added the type: bug Something isn't working correctly label Nov 5, 2023
@shaka-bot shaka-bot added this to the v4.6 milestone Nov 5, 2023
@avelad avelad added the priority: P1 Big impact or workaround impractical; resolve before feature release label Nov 6, 2023
@avelad avelad self-assigned this Nov 6, 2023
@absidue
Copy link

absidue commented Nov 6, 2023

Can confirm variants are still missing on the nightly demo page (v4.5.0-72-g2eedb12a1 (uncompiled)), just like in 4.5.0, when they have the same channel count. Worked fine in 4.4.0, so this is definitely a regression introduced since then, if I had to guess it's probably something to do with the addition of the audio groups feature.

Here is an example manifest to reproduce the issue (it's a modified version of: https://storage.googleapis.com/shaka-demo-assets/angel-one/dash.mpd):

<?xml version="1.0" encoding="UTF-8"?>
<!-- modified version of: https://storage.googleapis.com/shaka-demo-assets/angel-one/dash.mpd -->
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 DASH-MPD.xsd" profiles="urn:mpeg:dash:profile:isoff-on-demand:2011" minBufferTime="PT2S" type="static" mediaPresentationDuration="PT60S">
  <BaseURL>https://storage.googleapis.com/shaka-demo-assets/angel-one/</BaseURL>
  <Period id="0">
    <AdaptationSet id="8" contentType="audio" lang="en" subsegmentAlignment="true">
      <Representation id="13" bandwidth="130803" codecs="mp4a.40.2" mimeType="audio/mp4" audioSamplingRate="48000">
        <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
        <BaseURL>audio_en_2c_128k_aac.mp4</BaseURL>
        <SegmentBase indexRange="786-1009" timescale="48000">
          <Initialization range="0-785"/>
        </SegmentBase>
      </Representation>
      <Representation id="5" bandwidth="130432" codecs="mp4a.40.2" mimeType="audio/mp4" audioSamplingRate="48000">
        <!-- originally lang=de -->
        <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
        <BaseURL>audio_de_2c_128k_aac.mp4</BaseURL>
        <SegmentBase indexRange="786-997" timescale="48000">
          <Initialization range="0-785"/>
        </SegmentBase>
      </Representation>
    </AdaptationSet>
    <AdaptationSet id="12" contentType="audio" lang="fr" subsegmentAlignment="true">
      <Representation id="19" bandwidth="130446" codecs="mp4a.40.2" mimeType="audio/mp4" audioSamplingRate="48000">
        <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
        <BaseURL>audio_fr_2c_128k_aac.mp4</BaseURL>
        <SegmentBase indexRange="786-1009" timescale="48000">
          <Initialization range="0-785"/>
        </SegmentBase>
      </Representation>
      <Representation id="23" bandwidth="130582" codecs="mp4a.40.2" mimeType="audio/mp4" audioSamplingRate="48000">
        <!-- originally lang=it -->
        <AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
        <BaseURL>audio_it_2c_128k_aac.mp4</BaseURL>
        <SegmentBase indexRange="786-1009" timescale="48000">
          <Initialization range="0-785"/>
        </SegmentBase>
      </Representation>
    </AdaptationSet>
  </Period>
</MPD>

here as a data URI:
data:application/dash+xml;charset=utf-8,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3CMPD%20xmlns%3D%22urn%3Ampeg%3Adash%3Aschema%3Ampd%3A2011%22%20xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance%22%20xsi%3AschemaLocation%3D%22urn%3Ampeg%3Adash%3Aschema%3Ampd%3A2011%20DASH-MPD.xsd%22%20profiles%3D%22urn%3Ampeg%3Adash%3Aprofile%3Aisoff-on-demand%3A2011%22%20minBufferTime%3D%22PT2S%22%20type%3D%22static%22%20mediaPresentationDuration%3D%22PT60S%22%3E%3CBaseURL%3Ehttps%3A%2F%2Fstorage.googleapis.com%2Fshaka-demo-assets%2Fangel-one%2F%3C%2FBaseURL%3E%3CPeriod%20id%3D%220%22%3E%3CAdaptationSet%20id%3D%228%22%20contentType%3D%22audio%22%20lang%3D%22en%22%20subsegmentAlignment%3D%22true%22%3E%3CRepresentation%20id%3D%2213%22%20bandwidth%3D%22130803%22%20codecs%3D%22mp4a.40.2%22%20mimeType%3D%22audio%2Fmp4%22%20audioSamplingRate%3D%2248000%22%3E%3CAudioChannelConfiguration%20schemeIdUri%3D%22urn%3Ampeg%3Adash%3A23003%3A3%3Aaudio_channel_configuration%3A2011%22%20value%3D%222%22%2F%3E%3CBaseURL%3Eaudio_en_2c_128k_aac.mp4%3C%2FBaseURL%3E%3CSegmentBase%20indexRange%3D%22786-1009%22%20timescale%3D%2248000%22%3E%3CInitialization%20range%3D%220-785%22%2F%3E%3C%2FSegmentBase%3E%3C%2FRepresentation%3E%3CRepresentation%20id%3D%225%22%20bandwidth%3D%22130432%22%20codecs%3D%22mp4a.40.2%22%20mimeType%3D%22audio%2Fmp4%22%20audioSamplingRate%3D%2248000%22%3E%3CAudioChannelConfiguration%20schemeIdUri%3D%22urn%3Ampeg%3Adash%3A23003%3A3%3Aaudio_channel_configuration%3A2011%22%20value%3D%222%22%2F%3E%3CBaseURL%3Eaudio_de_2c_128k_aac.mp4%3C%2FBaseURL%3E%3CSegmentBase%20indexRange%3D%22786-997%22%20timescale%3D%2248000%22%3E%3CInitialization%20range%3D%220-785%22%2F%3E%3C%2FSegmentBase%3E%3C%2FRepresentation%3E%3C%2FAdaptationSet%3E%3CAdaptationSet%20id%3D%2212%22%20contentType%3D%22audio%22%20lang%3D%22fr%22%20subsegmentAlignment%3D%22true%22%3E%3CRepresentation%20id%3D%2219%22%20bandwidth%3D%22130446%22%20codecs%3D%22mp4a.40.2%22%20mimeType%3D%22audio%2Fmp4%22%20audioSamplingRate%3D%2248000%22%3E%3CAudioChannelConfiguration%20schemeIdUri%3D%22urn%3Ampeg%3Adash%3A23003%3A3%3Aaudio_channel_configuration%3A2011%22%20value%3D%222%22%2F%3E%3CBaseURL%3Eaudio_fr_2c_128k_aac.mp4%3C%2FBaseURL%3E%3CSegmentBase%20indexRange%3D%22786-1009%22%20timescale%3D%2248000%22%3E%3CInitialization%20range%3D%220-785%22%2F%3E%3C%2FSegmentBase%3E%3C%2FRepresentation%3E%3CRepresentation%20id%3D%2223%22%20bandwidth%3D%22130582%22%20codecs%3D%22mp4a.40.2%22%20mimeType%3D%22audio%2Fmp4%22%20audioSamplingRate%3D%2248000%22%3E%3CAudioChannelConfiguration%20schemeIdUri%3D%22urn%3Ampeg%3Adash%3A23003%3A3%3Aaudio_channel_configuration%3A2011%22%20value%3D%222%22%2F%3E%3CBaseURL%3Eaudio_it_2c_128k_aac.mp4%3C%2FBaseURL%3E%3CSegmentBase%20indexRange%3D%22786-1009%22%20timescale%3D%2248000%22%3E%3CInitialization%20range%3D%220-785%22%2F%3E%3C%2FSegmentBase%3E%3C%2FRepresentation%3E%3C%2FAdaptationSet%3E%3C%2FPeriod%3E%3C%2FMPD%3E

@avelad
Copy link
Member

avelad commented Nov 6, 2023

Please test it tomorrow, the nightly is not updated yet

@absidue
Copy link

absidue commented Nov 7, 2023

Can confirm that the issue persists on v4.5.0-76-gc2c832025 (uncompiled) with the manifest I provided. It seems like the audio channels change was just a workaround that fixes the specific manifest in the original issue. The manifest I provided works fine on 4.4.0, but is missing variants with 4.5.0 and the nightly demo.

@avelad avelad reopened this Nov 8, 2023
avelad added a commit that referenced this issue Nov 13, 2023
Robloche pushed a commit to Robloche/shaka-player that referenced this issue Nov 30, 2023
@shaka-bot shaka-bot added the status: archived Archived and locked; will not be updated label Jan 12, 2024
@shaka-project shaka-project locked as resolved and limited conversation to collaborators Jan 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
priority: P1 Big impact or workaround impractical; resolve before feature release status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
4 participants