# Set EXT-X-TARGETDURATION for WebVTT captions in live HLS

**URL:** <https://community.wowza.com/t/set-ext-x-targetduration-for-webvtt-captions-in-live-hls/41158>\
**Category:** Wowza Streaming Engine\
**Created:** [October 12, 2016, 10:10am UTC](https://community.wowza.com/t/set-ext-x-targetduration-for-webvtt-captions-in-live-hls/41158 "2016-10-12T10:10:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Chris\_Deely](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/chris_deely/32/977_2.png) [@Chris\_Deely](https://community.wowza.com/u/Chris_Deely)\
**Post date:** [October 12, 2016, 10:10am UTC](https://community.wowza.com/t/set-ext-x-targetduration-for-webvtt-captions-in-live-hls/41158/1 "2016-10-12T10:10:33Z")

</div>

Hello,

I have live streams packetized into HLS with

```auto
cupertinoLiveCaptionsUseWebVTT

```

set to true. The WebVTT manifests & segments are produced properly, however the EXT-X-TARGETDURATION value in the subtitle m3u8 is different than the duration in the rendition’s chunklist.

subtitlelist\_leng.m3u8

```auto
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:15
#EXT-X-MEDIA-SEQUENCE:462
#EXTINF:11.929
subtitlechunk_leng_462.webvtt

```

chunklist.m3u8

```auto
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-TARGETDURATION:11
#EXT-X-MEDIA-SEQUENCE:467
#EXT-X-DISCONTINUITY-SEQUENCE:23
#EXTINF:10.01
media-ujvb74pq5_467.ts

```

This disparity can cause the subtitles to drift apart from the media content & is a violation of [Apple’s guidlines](https://developer.apple.com/library/content/documentation/General/Reference/HLSAuthoringSpec/Requirements.html#//apple_ref/doc/uid/TP40016596-CH2-SW1)

> 5.4. For live/linear content, target durations for subtitle playlists MUST be identical to other media.

I also believe this is causing issues with playback on Apple devices. When subtitles are active on an iOS device, and the HLS stream encounters an EXT-X-DISCONTINUITY flag, the video/audio stream stops, but subtitles continue to be displayed. This does not occur on the same stream with subtitles disabled.

Is there a setting available to force the WebVTT segment duration to a desired value for HLS?

Thank you

---

<div class="post-metadata">

**Author:** ![Jermaine\_Hemby](https://avatars.discourse-cdn.com/v4/letter/j/82dd89/32.png) [@Jermaine\_Hemby](https://community.wowza.com/u/Jermaine_Hemby)\
**Post date:** [November 19, 2016, 9:36am UTC](https://community.wowza.com/t/set-ext-x-targetduration-for-webvtt-captions-in-live-hls/41158/2 "2016-11-19T09:36:03Z")

</div>

Hello!

Thanks for contacting Wowza Forums!

What version of Wowza are you running? What are your keyframes set to on the encoder? The live stream may not have a consistent key frame interval, that is a factor of the target chunk duration. I would double check the encoder, a good keyframe interval is anywhere beween 1-5. You can check the log files to see what Wowa is seeing as the keyframe interval.

In additon, you can enable detailed debugging and check the logs after enabling to also figure out what is going on. Instructions are listed [HERE](https://www.wowza.com/docs/how-to-stream-webvtt-subtitles-to-ios-for-closed-captioning#live)

If you need additonal help in reading the logs, I would suggest opening a ticket [HERE](https://www.wowza.com/support/open-ticket)

Regards,

Jermaine
