Reputation: 579
I am working on displaying subtitles in android video player. I have managed to do parsing subtitles from .srt file which is in assets folder. I used
inputStream = this.getAssets().open("Breaking Dawn Part 2.srt");
to fetch .srt file. Also I have displayed same subtitles while playing video. But now i want to fetch .srt file which is embedded in video already to show subtitles. I want to know how can I access .srt
file with this way, So that I can show subtitles during video streaming even in android v4 below devices. Kindly help if you have any idea regarding this.
Upvotes: 0
Views: 2871
Reputation: 116412
do you mean mkv files? or files that have the subtitles as part of the video? it's just that when you say "embedded in video" i think of it as if the subtitles are a part of the video, and not just optional ones.
if you do mean mkv files, you will need to parse the file itself. here are the specifications:
http://www.matroska.org/technical/specs/index.html#track
you might even use their libraries for this task:
http://matroska.org/team/source-code.html
Upvotes: 1