I have a requirement where I need to extract metadata from an HLS Stream in Android. I have found two libraries FFMPEG and VITAMIO. Considering the fragmented support of HLS streaming on android, and after reading a plethora of even more confusing articles, I have finalized the above two libraries for further research.I have not found a single application where the extraction of metadata(timed metadata) has been done on Android.
I am confused if it is even possible on Android. And if so,which approach should I use... help me out guys....
The timed text metadata isn't stored in the m3u8 file as suggested by Nikola's answer, but instead stored in the mpeg2 ts segments. An overview of how it's embedded in the ts is available here: https://developer.apple.com/library/ios/documentation/AudioVideo/Conceptual/HTTP_Live_Streaming_Metadata_Spec/HTTP_Live_Streaming_Metadata_Spec.pdf
You can try extracting the metadata with ffmpeg, the command should be something along the lines of this:
ffmpeg -i in.ts -f ffmetadata metadata.txt
You'll need to do the equivalent using jni and libavformat. It's not incredibly easy, and you'll still need to come up with a mechanism for signaling the read metadata to your application.
If you can, I would recommend signaling the timed metadata via a separate mechanism. Could you extract it and put it as a text file that your player downloads separately? Then you lines up with the timeline as reported by the video player? That would be much simpler to implement, but I don't know your requirements.