Skip to content

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

@TW2

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.

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