Open aarondib opened 7 years ago
Also, I noticed that inspite of selecting subtiles stream:
mediaPlayer.getSelectedTrack(ITrackInfo.MEDIA_TRACK_TYPE_TIMEDTEXT)
always returns -1
@yuazhen , could you give me any advice?
I've found the solution (https://github.com/Bilibili/ijkplayer/issues/2700):
mediaPlayer.setOption(IjkMediaPlayer.OPT_CATEGORY_PLAYER, "subtitle", 1);
Further quesion is when a stream has several subtitles tracks, when selecting another subtitle track you need to re-seek to the current position in order to get subtitles. But what to do if it's a live stream?
Also, when a stream has 1) dvbsub 2) subrip - selecting subrip will not show up subtitles.
Thanks!
This is indeed a problem. Currently switch between subtitle tracks in a live stream does not immediately display the corresponding subtitle. But you can try reduce subtitle packets queue size to 1 or use multiple queue to buffer all subtitle tracks then display the corresponding subtitle when switched. About the other question, could you offer a sample stream which contains dvdsub and subrip in it?
@aarondib sample streaming
@yuazhen , how about adding DVB subs support? This would be a great feature for the library.
ijkmp_set_stream_selected
How did you implement subtitles presentation ?
k0.7.8.1 version. Added ass, movtext, srt and subrip decoders and ass and srt demuxers. Subtitles tracks selected and deselected correctly:
ijkmp_set_stream_selected(3, 1)=0
But onTimedTextListener never called. Please, help! What did I miss?