How to Add External Webvtt Subtitles into Http Live Stream on iOS Client

How to add external .vtt subtitle file to AVPlayerViewController in tvOS

While it was almost mentioned no where in the apple documentation, I read in an article that subtitles need to be embedded in the HLS stream.

Subtitles are not intended to be added manually.. though I did find a StackOverflow post showing a hack. Unsure if it works or not.

Seeing that I use VIMEO Pro, the HLS stream that is provided has the WebVTT subtitles (that I uploaded to vimeo) embedded, thus solving my problem.

AVUrlAsset and WebVTTs

I've posted a solution over here: https://stackoverflow.com/a/37945178/171933 Basically you need to use an AVMutableComposition to join the video with the subtitles and then play back that composition.

Embedding Subtiles/Captioned Comments in TVML TVOS

It seems at the moment there is no external subtitle file support.

Probably in future Apple might add the same, but currently we'll have to burn the subtitle files within the m3u8 playlist.



Related Topics



Leave a reply



Submit