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 hard of hearing subtitle distinction #5211

Closed
DDeis opened this issue May 4, 2023 · 2 comments · Fixed by #5216
Closed

DASH hard of hearing subtitle distinction #5211

DDeis opened this issue May 4, 2023 · 2 comments · Fixed by #5216
Assignees
Labels
component: DASH The issue involves the MPEG DASH manifest format status: archived Archived and locked; will not be updated type: accessibility An accessibility issue type: enhancement New feature or request
Milestone

Comments

@DDeis
Copy link
Contributor

DDeis commented May 4, 2023

Have you read the FAQ and checked for duplicate open issues?
Closed issue 2734 seems partially similar

What version of Shaka Player are you using?
4.3.6 (Not the UI version)

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

Can you reproduce the issue with the latest code from main?
Not tested

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

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

What browser and OS are you using?
MacOS Ventura 13.3 / Chrome 113.0.5672.63

What did you do?

When loading a manifest with the following text adaptation set:

<!-- French -->

<AdaptationSet id="7" group="8" bitstreamSwitching="true" segmentAlignment="true" contentType="text" mimeType="application/mp4" lang="fre">
  <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"/>
  <SegmentTemplate timescale="10000000" media="S!d2ENZGFzaF9keW5fd2lkZRICVP7...8BFgSf/QualityLevels($Bandwidth$)/Fragments(fre_0=$Time$)" initialization="S!d2ENZGFzaF9keW5fd2lkZRICVP7...8BFgSf/QualityLevels($Bandwidth$)/Fragments(fre_0=Init)">
    <SegmentTimeline>
      <S t="16832248012912070" d="20000000" r="412"/>
    </SegmentTimeline>
  </SegmentTemplate>
  <Representation id="dxFknw.." bandwidth="100" codecs="stpp"/>
</AdaptationSet>

<AdaptationSet id="8" group="8" bitstreamSwitching="true" segmentAlignment="true" contentType="text" mimeType="application/mp4" lang="fre">
  <Accessibility schemeIdUri="urn:tva:metadata:cs:AudioPurposeCS:2007" value="2"/>
  <Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"/>
  <SegmentTemplate timescale="10000000" media="S!d2ENZGFzaF9keW5fd2lkZRICVP7...8BFgSf/QualityLevels($Bandwidth$)/Fragments(fre_1=$Time$)" initialization="S!d2ENZGFzaF9keW5fd2lkZRICVP7...8BFgSf/QualityLevels($Bandwidth$)/Fragments(fre_1=Init)">
    <SegmentTimeline>
      <S t="16832248012912070" d="20000000" r="412"/>
    </SegmentTimeline>
  </SegmentTemplate>
  <Representation id="dxFlnw.." bandwidth="101" codecs="stpp"/>
</AdaptationSet>


<!-- German -->

<AdaptationSet id="9" group="8" bitstreamSwitching="true" segmentAlignment="true" contentType="text" mimeType="application/mp4" lang="ger">
  <Role schemeIdUri="urn:mpeg:dash:role:2011" value="alternate"/>
  <SegmentTemplate timescale="10000000" media="S!d2ENZGFzaF9keW5fd2lkZRICVP7...8BFgSf/QualityLevels($Bandwidth$)/Fragments(ger_2=$Time$)" initialization="S!d2ENZGFzaF9keW5fd2lkZRICVP7...8BFgSf/QualityLevels($Bandwidth$)/Fragments(ger_2=Init)">
    <SegmentTimeline>
      <S t="16832248012912070" d="20000000" r="412"/>
    </SegmentTimeline>
  </SegmentTemplate>
  <Representation id="dxFmnw.." bandwidth="102" codecs="stpp"/>
</AdaptationSet>

<AdaptationSet id="10" group="8" bitstreamSwitching="true" segmentAlignment="true" contentType="text" mimeType="application/mp4" lang="ger">
  <Accessibility schemeIdUri="urn:tva:metadata:cs:AudioPurposeCS:2007" value="2"/>
  <Role schemeIdUri="urn:mpeg:dash:role:2011" value="alternate"/>
  <SegmentTemplate timescale="10000000" media="S!d2ENZGFzaF9keW5fd2lkZRICVP7...8BFgSf/QualityLevels($Bandwidth$)/Fragments(ger_3=$Time$)" initialization="S!d2ENZGFzaF9keW5fd2lkZRICVP7...8BFgSf/QualityLevels($Bandwidth$)/Fragments(ger_3=Init)">
    <SegmentTimeline>
      <S t="16832248012912070" d="20000000" r="412"/>
    </SegmentTimeline>
  </SegmentTemplate>
  <Representation id="dxFnnw.." bandwidth="103" codecs="stpp"/>
</AdaptationSet>

What did you expect to happen?

As per https://dvb.org/wp-content/uploads/2022/07/A168r6_MPEG-DASH-Profile-for-Transport-of-ISO-BMFF-Based-DVB-Services_Interim-Draft-ts_103-285-v141_October_2022.pdf (page 57, table 19), <Accessibility schemeIdUri="urn:tva:metadata:cs:AudioPurposeCS:2007" value="2"/> allows to identify hard of hearing subtitle tracks.

What actually happened?

Text tracks returned by shaka provide no means to distinguish the hard of hearing track from the basic track of the same language.

[
    {
        "id": 19,
        "active": false,
        "type": "text",
        "bandwidth": 0,
        "language": "fr",
        "label": null,
        "kind": "subtitle",
        "width": null,
        "height": null,
        "frameRate": null,
        "pixelAspectRatio": null,
        "hdr": null,
        "mimeType": "application/mp4",
        "audioMimeType": null,
        "videoMimeType": null,
        "codecs": "stpp",
        "audioCodec": null,
        "videoCodec": null,
        "primary": true,
        "roles": [
            "main"
        ],
        "audioRoles": null,
        "forced": false,
        "videoId": null,
        "audioId": null,
        "channelsCount": null,
        "audioSamplingRate": null,
        "spatialAudio": false,
        "tilesLayout": null,
        "audioBandwidth": null,
        "videoBandwidth": null,
        "originalVideoId": null,
        "originalAudioId": null,
        "originalTextId": "dxFknw..",
        "originalImageId": null
    },
    {
        "id": 20,
        "active": false,
        "type": "text",
        "bandwidth": 0,
        "language": "fr",
        "label": null,
        "kind": "subtitle",
        "width": null,
        "height": null,
        "frameRate": null,
        "pixelAspectRatio": null,
        "hdr": null,
        "mimeType": "application/mp4",
        "audioMimeType": null,
        "videoMimeType": null,
        "codecs": "stpp",
        "audioCodec": null,
        "videoCodec": null,
        "primary": true,
        "roles": [
            "main"
        ],
        "audioRoles": null,
        "forced": false,
        "videoId": null,
        "audioId": null,
        "channelsCount": null,
        "audioSamplingRate": null,
        "spatialAudio": false,
        "tilesLayout": null,
        "audioBandwidth": null,
        "videoBandwidth": null,
        "originalVideoId": null,
        "originalAudioId": null,
        "originalTextId": "dxFlnw..",
        "originalImageId": null
    },
    {
        "id": 21,
        "active": false,
        "type": "text",
        "bandwidth": 0,
        "language": "de",
        "label": null,
        "kind": "subtitle",
        "width": null,
        "height": null,
        "frameRate": null,
        "pixelAspectRatio": null,
        "hdr": null,
        "mimeType": "application/mp4",
        "audioMimeType": null,
        "videoMimeType": null,
        "codecs": "stpp",
        "audioCodec": null,
        "videoCodec": null,
        "primary": false,
        "roles": [
            "alternate"
        ],
        "audioRoles": null,
        "forced": false,
        "videoId": null,
        "audioId": null,
        "channelsCount": null,
        "audioSamplingRate": null,
        "spatialAudio": false,
        "tilesLayout": null,
        "audioBandwidth": null,
        "videoBandwidth": null,
        "originalVideoId": null,
        "originalAudioId": null,
        "originalTextId": "dxFmnw..",
        "originalImageId": null
    },
    {
        "id": 22,
        "active": false,
        "type": "text",
        "bandwidth": 0,
        "language": "de",
        "label": null,
        "kind": "subtitle",
        "width": null,
        "height": null,
        "frameRate": null,
        "pixelAspectRatio": null,
        "hdr": null,
        "mimeType": "application/mp4",
        "audioMimeType": null,
        "videoMimeType": null,
        "codecs": "stpp",
        "audioCodec": null,
        "videoCodec": null,
        "primary": false,
        "roles": [
            "alternate"
        ],
        "audioRoles": null,
        "forced": false,
        "videoId": null,
        "audioId": null,
        "channelsCount": null,
        "audioSamplingRate": null,
        "spatialAudio": false,
        "tilesLayout": null,
        "audioBandwidth": null,
        "videoBandwidth": null,
        "originalVideoId": null,
        "originalAudioId": null,
        "originalTextId": "dxFnnw..",
        "originalImageId": null
    }
]

I'm willing to send a PR, I suppose it would be by handling urn:tva:metadata:cs:AudioPurposeCS:2007 in dash_parser.parseAdaptationSet_ but I don't know how it would be convenient to map the value in shaka.extern.Track

@DDeis DDeis added the type: bug Something isn't working correctly label May 4, 2023
@github-actions github-actions bot added this to the v4.4 milestone May 4, 2023
@avelad avelad added the component: DASH The issue involves the MPEG DASH manifest format label May 5, 2023
@avelad
Copy link
Member

avelad commented May 5, 2023

@theodab can you help here? Thanks!

@theodab theodab self-assigned this May 6, 2023
@theodab
Copy link
Contributor

theodab commented May 6, 2023

It's called "urn:tva:metadata:cs:AudioPurposeCS:2007" but it's also used for subtitles? How wacky.
Anyway, this shouldn't be too hard.

theodab added a commit to theodab/shaka-player that referenced this issue May 6, 2023
@theodab theodab added type: enhancement New feature or request type: accessibility An accessibility issue and removed type: bug Something isn't working correctly labels May 6, 2023
@theodab theodab closed this as completed in 654a028 May 9, 2023
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Jul 8, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component: DASH The issue involves the MPEG DASH manifest format status: archived Archived and locked; will not be updated type: accessibility An accessibility issue type: enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants