shaka-project / shaka-player

JavaScript player library / DASH & HLS client / MSE-EME player
Apache License 2.0
7.14k stars 1.34k forks source link

Some subtitles in the manifest are not shown in the player #3724

Closed king-prawns closed 2 years ago

king-prawns commented 2 years ago

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

What version of Shaka Player are you using? 3.3.0

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

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

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

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

What browser and OS are you using? I loaded the DASH manifest on Shaka demo app on Chrome.

For embedded devices (smart TVs, etc.), what model and firmware version are you using? I can reproduce the bug using a Samsung TV (UT4300, Tizen 5.5) and a DASH Playready manifest

What are the manifest and license server URIs? This is the important part:

<AdaptationSet mimeType="application/mp4" startWithSAP="1" lang="eng">
      <Role schemeIdUri="urn:mpeg:dash:role:2011" value="subtitle"/>
      <Representation id="subtitles/eng/stpp" codecs="stpp" bandwidth="1178"/>
      <SegmentTemplate timescale="1000" initialization="$RepresentationID$/init.mp4" media="$RepresentationID$/seg-$Number$.m4s" startNumber="1">
        <SegmentTimeline>
          <S d="8000" r="974"/>
        </SegmentTimeline>
      </SegmentTemplate>
    </AdaptationSet>
    <AdaptationSet mimeType="application/mp4" startWithSAP="1" lang="ger">
      <Role schemeIdUri="urn:mpeg:dash:role:2011" value="subtitle"/>
      <Accessibility schemeIdUri="urn:tva:metadata:cs:AudioPurposeCS:2007" value="2"/>
      <Representation id="subtitles/ger-ad/stpp" codecs="stpp" bandwidth="1172"/>
      <SegmentTemplate timescale="1000" initialization="$RepresentationID$/init.mp4" media="$RepresentationID$/seg-$Number$.m4s" startNumber="1">
        <SegmentTimeline>
          <S d="8000" r="977"/>
        </SegmentTimeline>
      </SegmentTemplate>
    </AdaptationSet>
    <AdaptationSet mimeType="application/mp4" startWithSAP="1" lang="ger">
      <Role schemeIdUri="urn:mpeg:dash:role:2011" value="subtitle"/>
      <Representation id="subtitles/ger/stpp" codecs="stpp" bandwidth="1158"/>
      <SegmentTemplate timescale="1000" initialization="$RepresentationID$/init.mp4" media="$RepresentationID$/seg-$Number$.m4s" startNumber="1">
        <SegmentTimeline>
          <S d="8000" r="983"/>
        </SegmentTimeline>
      </SegmentTemplate>
    </AdaptationSet>

I can send you the manifest file via email if needed.

What configuration are you using? What is the output of player.getConfiguration()? Base config on Shaka demo app

What did you do? Load the manifest in Shaka demo app

What did you expect to happen? Shaka should show 3 choice in the caption menu.

What actually happened? The manifest contains 3 different subtitles but Shaka show only 2 possible choice: "en", "ger". Shaka ignore the second "ger" subtitle even if the representation id and bandwidth are different.

joeyparrish commented 2 years ago

Do you see all three text tracks in player.getTextTracks()? If so, this is merely a UI issue.

king-prawns commented 2 years ago

Do you see all three text tracks in player.getTextTracks()? If so, this is merely a UI issue.

Hey @joeyparrish, Unfortunately it doesn't seems a UI issue because player.getTextTracks() returns only 2 tracks.

I opened a PR that fix the issue: https://github.com/google/shaka-player/pull/3725 there are a couple of solutions.

king-prawns commented 2 years ago

Hey @joeyparrish, I opened a second PR with another possible solution to fix the issue: #3765