Skip to content

TX3G Subtitles not showing in Exoplayer #8271

Closed

Description

@AliZgheib

Hello everyone,

Introduction:
I've been trying to implement exoplayer in a project of mine. The media that im trying to load in the players has different tracks embedded to it, such as audio tracks (English and Portuguese), text tracks (English and Portuguese).

Issue:
I was able to listen/read the audio/subtitles in the VLC player however, when I tried to do the same in exoplayer, I was able to change between the audio tracks ( it worked) however, the subtitles options didnt show up in the player ( and using the none/default options didn't do anything either).
After submitting an issue to this repo describing this problem Link to the issue. I received a response saying the 2 text tracks embedded to the media are of 2 different formats ( Vobsub , tx3g), and that vobsub format is not supported by exoplayer.

So my issue is, why exoplayer is not showing the tx3g format subtitles even though its one of the supported formats?
Can someone look at the media link please and provide me with any feedback?

Thank you a lot in advance!

Link to the media:
H265 media

Additional:
Capture

Activity

  1. self-assigned this
    on Nov 24, 2020
  2. icbaker commented on Nov 24, 2020

    @icbaker
    Collaborator

    I looked at the file you provided in MP4Box.js.

    The trak box with id=5 (the tx3g one) has a hdlr box with handler=text. We treat this as a text track:

    } else if (hdlr == TYPE_text || hdlr == TYPE_sbtl || hdlr == TYPE_subt || hdlr == TYPE_clcp) {
    return C.TRACK_TYPE_TEXT;

    However the stsd box contains a box with type=text. This isn't one of the subtitle types that we detect when parsing stsd boxes:

    } else if (childAtomType == Atom.TYPE_TTML || childAtomType == Atom.TYPE_tx3g
    || childAtomType == Atom.TYPE_wvtt || childAtomType == Atom.TYPE_stpp
    || childAtomType == Atom.TYPE_c608) {
    parseTextSampleEntry(stsd, childAtomType, childStartPosition, childAtomSize, trackId,
    language, out);

    I changed AtomParsers in two places: The if above to treat it as a text track and also inside parseTextSampleEntry() to assume text is tx3g:

    Then the track appears in the track selector of the demo app, and renders "Chapter 1" semi-permanently (it eventually changes to "Chapter 2") - same behaviour as VLC.

    @kim-vde Do you know if a) type=text is valid for a stsd box? b) It's reasonable to assume this contains tx3g? Or is this media not quite structured correctly? (note I noted a different weirdness about this same media in #8260 (comment))

  3. kim-vde commented on Dec 7, 2020

    @kim-vde
    Contributor

    I wouldn't add support for type text in ExoPlayer because this is the only issue reporting this (as far as I am aware of), I couldn't find anything about this type (in here for example) and because there is no apparent link between type text and tx3g.

    Do not hesitate to open another issue if you find information about this type (e.g. other issues, specifications).

  4. locked and limited conversation to collaborators on Feb 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions