Page 1 of 1

HLS with subtitles

Posted: 18 Jul 2015 08:03
by luke823
Is this supported on android?

I am trying to play an HLS video which works without any problem. But as soon as I call libVlc.addSubtitleTrack, this causes the Vout event to fire and then error handling kicks and stops playback. I beleive I have reproduced the same behavior with the Vlc app by playing the same Hls url as a network stream, and then using the subtitle picker to load my srt file.

I think it might be due to this bug which has been open for several years now, unfortunately:

https://trac.videolan.org/vlc/ticket/3075

Re: HLS with subtitles

Posted: 18 Jul 2015 20:01
by Jean-Baptiste Kempf
You want to play a VOD HLS and add an external subtitle, local file?

Re: HLS with subtitles

Posted: 20 Jul 2015 03:20
by luke823
That's correct. For now I need a workaround so I'm just going to render the subtitle text myself when streaming with HLS. When I'm direct streaming a plain video file such as mp4 or mkv, then there's no problem and I can add the subtitle track with libVlc.

Since I also have control over the server, I also thought about trying HLS with mp4 as a temporary workaround, but I don't think that's quite common enough for me to feel comfortable doing that. Our server also supports embedding subtitles into the HLS manifest, but I'm not sure you've implemented that yet as the player never recognized them.

Re: HLS with subtitles

Posted: 20 Jul 2015 13:42
by Jean-Baptiste Kempf
Does VLC sees the timeline correctly too?

Re: HLS with subtitles

Posted: 20 Jul 2015 14:10
by luke823
i'll have to test again but it seemed to play normally other than the fact that subs weren't available.