Reputation: 6620
I have a MediaPlayer object. I show MP4 video files fine.
Now I want to show my .MP4 file's internal subtitle. So I use
// this code makes the player show the subtitle in the mp4 file it is playing
mPlayer.selectTrack(subtitleTrackIndex);
and yes I'm sure the index is exactly pointing to my subtitle track, not audio or video tracks.
The track loads fine but no text ever appears on screen. Why is that? Is it my subtitle track's format? I have included the Media Info of my subtitle track in the picture below.
Does Android have any limitation on playing some specific "Muxing mode" or "Codec id" for subtitles?
Any other idea is much appreciated.
P.S. I am and should be using Android 4.2.2 and due to technical decisions I prefer to use internal subtitles rather than external ones.
Upvotes: 2
Views: 1094
Reputation: 530
I have exactly the same problem and it seems that native android MediaPlayer doesn't support internal subtitles (in my case dvbsub codec), the "SelectTrack" method is giving an exception. You should use compile vlc and use it instead but the limitation is with High Definition Videos, it requires Hardware Acceleration. Did you find any other solution?
Upvotes: 2