https://code.videolan.org/videolan/libv ... id-samples
https://code.videolan.org/videolan/vlc-android
Code: Select all
// MediaPlayer.getSpuTracks() - Get the list of available spu (subtitle) tracks.
Code: Select all
MediaPlayer.TrackDescription[] trackDescriptions = mMediaPlayer.getSpuTracks();
Code: Select all
for (int i = 1; i < trackDescriptions.length; i++) {
Code: Select all
MediaPlayer.TrackDescription description = trackDescriptions[i];
Code: Select all
Log.i(TAG, "loadSpuTrack " + description.name + ", id " + description.id);
Code: Select all
}
loadSpuTrack Track 1, id 2
loadSpuTrack Track 2, id 3
loadSpuTrack Track 3, id 4
loadSpuTrack Track 4, id 5
loadSpuTrack Track 5, id 6
It just searches and adds all external text track files (.srt, .ass) from parent file (directory) of video file (.mkv) and from video file itself
But there is no API (Java methods inside MediaPlayer or LibVLC classes) to identify if added subtitles are external or internal (from video file container), no method to disable adding external subtitles
Is there any solution?