I've been maintaining adaptive HLS+FairPlay streams with audio and video for years. My implementation works great. However, I'm now also implementing captions or subtitles, and I'm having trouble with the later.
I'm actually able to generate my HLS streams with WebVTT subtitles, and they work great. But as soon as I encrypt the streams, Apple players stop working (forever stall). And my fairplay implementation works perfectly when no subtitles are involved.
I'm not encrypting the webvtt chunks: they travel as plain text, as stated in Apple guidelines. I believe this may be the issue: encrypted a/v streams with an unencrypted subtitles stream. However, encrypting plain text subtitles with SAMPLE-AES has no sense to me, so far I was unable to find a single HLS example online with subtitles that also happen to have FairPlay encryption. All documents I have about FairPlay also say nothing about this,
I've also tried applying CEA-608 closed captions in the video stream, and this actually works great with FairPlay. But CEA-608 has its own issues, and so I would like to migrate that tech to WebVTT: which also works great, except when FairPlay is involved.
I understand that Apple also establishes that I could use TTML (ISMC1) inside fMP4, which I suspect may be SAMPLE-AES encryptable. However, given my customers use cases, I need to use TS format for HLS, and so I can't use fMP4.
With all this in mind, do anybody know how to properly configure HLS+FairPlay with a plain text WebVTT subtitles stream? Please note this is about live streaming, and not VOD nor offline playback.
Thanks.
I've eventually found the problem. It wasn't fairplay.
The thing was that, for different reasons, our encoders created medialist with nont matching "EXT-X-DISCONTINUITY-SEQUENCE" tag between A/V and text streams. My tests without fairplay were working fine because, after restarting the streams without encription, EXT-X-DISCONTINUITY-SEQUENCE was 0 in all medialists.
After this details was found, I was able to fix our encoders, and now webvtt works fine with fairplay enabled for audio and video in our LIVE streams.