4

Just wondered if I'm missing something with the HLS spec but I'd like to add captions/subtitles into the HLS .m3u8, using WebVTT.

I've seen sites where people say any HLS subtitle file either should be segmented, or must be segmented (in the case of this cli to do it: https://www.rubydoc.info/gems/webvtt-ruby/0.3.0#segmenting-for-http-live-streaming-hls it says 'Segmenting is required to work with HLS videos').

Yet (as far as I can see) the Apple doc does not say that https://developer.apple.com/documentation/http_live_streaming/hls_authoring_specification_for_apple_devices.

Given the extra overhead I'd rather not segment if possible. So the question is whether it has to be done or not. Or has the situation changed so it now is/isn't needed.

Thanks.

coder_uk
  • 657
  • 1
  • 8
  • 20

1 Answers1

0

Yes - the segmentation is required. https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis-07#page-9 talks all about segments.

I can imagine that a video-on-demand package still works if all subtitles are in one segment since the amount of subtitle data is small.

Obviously - in a live scenario the captions have to be requested in sync with audio and video. So there is no way around segmentation.

Community
  • 1
  • 1
Markus Schumann
  • 7,636
  • 1
  • 21
  • 27
  • Thanks. Makes sense that for live the file would have to be segmented. But it's video-on-demand in my case, and I wondered if for that it is required. Still not clear based on the second line. It's not clear if there is a file size/duration cut-off between using a single webvtt and having to split it into multiple ones – coder_uk Aug 25 '20 at 18:35
  • 1
    If you really don't want to segment and the subtitles work being in a single segment - I'd go for it. – Markus Schumann Aug 26 '20 at 14:22