How to load subtitles? Solution and example required.
TW2 opened this issue · 0 comments
TW2 commented
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.