You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
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))
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).
Activity
icbaker commentedon Nov 24, 2020
I looked at the file you provided in MP4Box.js.
The
trakbox withid=5(the tx3g one) has ahdlrbox withhandler=text. We treat this as a text track:ExoPlayer/library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java
Lines 794 to 795 in 59b34ed
However the
stsdbox contains a box withtype=text. This isn't one of the subtitle types that we detect when parsingstsdboxes:ExoPlayer/library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java
Lines 892 to 896 in 59b34ed
I changed
AtomParsersin two places: Theifabove to treat it as a text track and also insideparseTextSampleEntry()to assumetextistx3g:ExoPlayer/library/extractor/src/main/java/com/google/android/exoplayer2/extractor/mp4/AtomParsers.java
Line 928 in 59b34ed
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=textis valid for astsdbox? b) It's reasonable to assume this containstx3g? Or is this media not quite structured correctly? (note I noted a different weirdness about this same media in #8260 (comment))kim-vde commentedon Dec 7, 2020
I wouldn't add support for type
textin 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 typetextandtx3g.Do not hesitate to open another issue if you find information about this type (e.g. other issues, specifications).