Skip to content

How to load subtitles? Solution and example required. #245

Closed

Description

@TW2

I try to load an external subtitles file like that:

public void setAssFile(File assFile) {
        playbin.set("suburi", assFile.toURI());
        
        Set<PlayFlags> flags = playbin.getFlags();
        flags.clear();
        
        flags.add(PlayFlags.VIDEO);
        flags.add(PlayFlags.AUDIO);
        flags.add(PlayFlags.TEXT);
        
        playbin.setFlags(flags);
}

The 'suburi' returns the good uri for subtitles and when playing the content is transfered to 'current-suburi' perfectly.
At playing 'n-text' is '1' and 'current-text' is '0' (my video source has no subtitles).

But there is no subtitles in video display! How to do it?

Note: I precise that a video source muxed with subtitles displays its default subtitles object during playback.

Activity

  1. locked and limited conversation to collaborators on Dec 6, 2021
  2. converted this issue into a discussion #246 on Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions