Video encoding for streaming HTTP with subtitles

I followed Apple's guidance for HTTP Live Streaming and worked well in my application, but I would like to embed subtitles in the video. This thread in Quora suggests that Netflix did this.

My source videos have subtitles embedded through the .srt file using QuickTime Pro, and the subtitles can be seen when playing videos in QuickTime and in my iOS application. As soon as I split the video into smaller .ts files using the mediafilesegmenter (as required for HLS), the subtitles disappear. I am using MPMoviePlayerController .

Is there a special way to encode the original video or use media files for subtitles to work?

+4
source share
3 answers

It is possible to have titles in the ts stream (e.g., EIA-608 or EIA-708). I don’t know any good free tool for inserting such subtitles into ts stream, but probably Manzanita will sell you something (for an absurd price).

Unfortunately, many HLS players will ignore subtitles because the HLS specification does not mention how to handle subtitle tracks. In your own application, you can test it by finding a ts file that already contains the text EIA-608 / EIA-708 and segments it.

To be honest, I think embedding subtitles in TS is a dead end and it will be easier for you to write your own subtitle screen called by TimedMetadata.

=== UPDATE ===

Starting with version 9 (September 22, 2012) of the HLS project, WebVTT subtitles are supported in HLS. I do not know any tool for preparing threads with them.

+4
source

I think that for HTTP Live Streaming in the browser there is no subtitle support (I could be wrong).

However, there are policies such as http://captionatorjs.com/ that allow subtitles in video on iOS. Now, I know that the captionator works for videos other than HLS, but I'm not sure if it works with HLS ... you need to research / test.


PS if you have your own application, then you are looking for temporary metadata http://developer.apple.com/library/ios/#documentation/mediaplayer/reference/MPTimedMetadata_Class/Reference/Reference.html to support things like captions.

0
source

In case this helps someone, I have an application that transfers HLS content from a Vimeo Pro account. Vimeo allows you to add WebVTT subtitles that are perfectly handled on iOS and tvOS devices.

To generate the .vtt file, I used YouTube, as shown here: https://www.youtube.com/watch?v=vlj_Lq31BKw

0
source

All Articles