5

My team produces iOS apps that play video using AVPlayer. We've recently been told that we MUST allow display of closed captions for all videos... but that the closed captions would not be coming as a track within the video files (we already support closed captions that come in this way). Instead, we'll be getting them as a separate text file. I've seen a couple references to including the caption text file in the SMIL, but I've found nothing about how to incorporate this text file into the playback experience. Does anyone have any personal experience with this, or know of any online documentation/tutorials that would help?

LoriHC
  • 126
  • 1
  • 7
  • What is the format of the captions in the text file? – James deBoer Aug 30 '12 at 01:36
  • The first answer was SAMI, which is not valid XML. It seems we will be getting a webvtt file instead now, which gives us a solution for iOS6. That may have to be sufficient. :-/ – LoriHC Aug 30 '12 at 13:18
  • @LoriHC Did you manage to get a separate WebVTT file working in iOS6? – SpacyRicochet Nov 01 '12 at 10:15
  • @SpacyRicochet Yes, see Answer below. It was a little more complicated than most people will have to deal with because our content requires DRM (and thus the DRM provider had to be involved in the solution), but the separate playlist that references the webvtt files, which itself is referenced from the main m3u8, works. – LoriHC Nov 28 '12 at 14:29

1 Answers1

2

OK, we have a plan now, though it's a little complicated because DRM is involved. The simplified version is that we're going to do what's described in the What's New in HTTP Live Streaming talk from WWDC 2012 (https://developer.apple.com/videos/wwdc/2012/?id=512): namely, create a playlist that references our webvtt file(s), and then reference that playlist from the main m3u8. This will give us closed-captions-as-subtitles in iOS6.

LoriHC
  • 126
  • 1
  • 7
  • 1
    This is the prescribed way to do it, and not a work-around. But good that you got it working this way :) Won't be able to implement this though, since the client wanted to know if using a separately downloaded WebVTT could be inserted for use with the streaming video. – SpacyRicochet Nov 28 '12 at 15:19
  • @SpacyRicochet You could; you'd just need to create the playlist that references the webvtt file(s) and re-write the main m3u8, both on the fly. Not sure if that's a viable option for you. – LoriHC Dec 13 '12 at 01:49
  • We already decided that we're not going to implement subtitles in the app until our streaming provider manages to implement the Apple prescribed method. Better this way, I think. Thanks for the advice :) – SpacyRicochet Dec 13 '12 at 09:34
  • @LoriHC did the method described in the wwdc 2012 talk work for you on iOS 7? – tommy chheng Oct 28 '13 at 21:22