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 + multiple subtitles adaptation sets issue #4650

Closed
Robloche opened this issue Nov 3, 2022 · 3 comments · Fixed by #7523
Closed

DASH + multiple subtitles adaptation sets issue #4650

Robloche opened this issue Nov 3, 2022 · 3 comments · Fixed by #7523
Labels
priority: P2 Smaller impact or easy workaround type: enhancement New feature or request

Comments

@Robloche
Copy link
Contributor

Robloche commented Nov 3, 2022

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

What version of Shaka Player are you using?
4.2.3.

Can you reproduce the issue with our latest release version?
Not tried.

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

Are you using the demo app or your own custom app?
My own app.

If custom app, can you reproduce the issue using our demo app?
Not tried.

What browser and OS are you using?
Chrome 107.0.5304.88 (Build officiel) (64 bits)
Windows Windows 10 Professionnel 21H2

What are the manifest and license server URIs?
Manifest excerpt:

<AdaptationSet
        id="3"
        group="3"
        contentType="text"
        lang="fr"
        mimeType="application/mp4"
        codecs="wvtt"
        startWithSAP="1">
    <Role schemeIdUri="urn:mpeg:dash:role:2011" value="subtitle"/>
    <Role schemeIdUri="urn:mpeg:dash:role:2011" value="subtitle"/>
    <SegmentTemplate
            timescale="1000"
            initialization="1167569875-1665437344_france-domtom_DRM-$RepresentationID$.dash"
            media="1167569875-1665437344_france-domtom_DRM-$RepresentationID$-$Time$.dash">
        <SegmentTimeline>
            <S t="0" d="10000" r="259"/>
            <S d="2480"/>
        </SegmentTimeline>
    </SegmentTemplate>
    <Representation
            id="textstream_fre=1000"
            bandwidth="1000">
    </Representation>
</AdaptationSet>
<AdaptationSet
        id="4"
        group="3"
        contentType="text"
        lang="fr"
        mimeType="text/vtt">
    <Role schemeIdUri="urn:mpeg:dash:role:2011" value="subtitle"/>
    <Role schemeIdUri="urn:mpeg:dash:role:2011" value="subtitle"/>
    <Representation
            id="988352792"
            bandwidth="1000">
        <BaseURL>textstream_fre=1000.webvtt</BaseURL>
    </Representation>
</AdaptationSet>

What did you expect to happen?
As per specification, if several AdaptationSet with the same group are present, ony one should be presented:
https://dashif.org/docs/DASH-IF-IOP-v4.2-clean.htm#:~:text=Only%20one%20Representation%20in%20a%20Group%20is%20intended%20to%20be%20presented%20at%20a%20time.
So, getTextTracks() should return onyl 1 subtitles track.

What actually happened?
getTextTracks() returns the 2 subtitles tracks.

@Robloche Robloche added the type: bug Something isn't working correctly label Nov 3, 2022
@github-actions github-actions bot added this to the v4.3 milestone Nov 3, 2022
@joeyparrish
Copy link
Member

I can see from your example that the two tracks are equivalent in language, and only differ in format.

This is analogous to video and audio, where you may have the same resolutions/languages available in multiple codecs.

For video and audio, we select a single codec early, because we don't yet have the ability to switch codecs during a presentation. (See #1528.) However, that is not the case for text. Because text stream parsing happens at the JavaScript level, we can switch between text streams without concern for their format or codec.

If we should only return one track in your case, how should we choose?

For audio and video, we introduced some configurations to let applications decide how we choose. (See preferredVideoCodecs and preferredAudioCodecs under https://shaka-player-demo.appspot.com/docs/api/shaka.extern.html#.PlayerConfiguration)

Should we introduce a similar config for text? Something like:

player.configure('preferredTextFormats', [
  'wvtt',  // in MP4
  'text/vtt',  // as text
]);

@avelad
Copy link
Member

avelad commented Nov 4, 2022

I'm agree with adding preferredTextFormats if we have the same language, same role, and forced.

@Robloche
Copy link
Contributor Author

Robloche commented Nov 7, 2022

Thanks for answering.
I really like the preferredTextFormats option, indeed.

But besides that, the player should choose and present only one text track (maybe the first one?) per group. Is your understanding of the spec different from mine?

@avelad avelad added type: enhancement New feature or request priority: P2 Smaller impact or easy workaround and removed type: bug Something isn't working correctly labels Nov 9, 2022
@avelad avelad modified the milestones: v4.3, v4.4 Nov 11, 2022
@avelad avelad modified the milestones: v4.4, v4.5 Aug 31, 2023
@avelad avelad modified the milestones: v4.5, v4.6 Oct 5, 2023
@avelad avelad modified the milestones: v4.6, v5.0 Nov 16, 2023
@avelad avelad modified the milestones: v4.7, v5.0 Dec 4, 2023
@avelad avelad modified the milestones: v4.8, v4.9 Apr 26, 2024
@avelad avelad modified the milestones: v4.9, v4.10 May 30, 2024
@avelad avelad modified the milestones: v4.10, v4.11 Jul 1, 2024
@avelad avelad modified the milestones: v4.11, v4.12, Backlog Sep 12, 2024
@avelad avelad closed this as completed in 597e129 Oct 31, 2024
@avelad avelad removed this from the Backlog milestone Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: P2 Smaller impact or easy workaround type: enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants