Modify segment duration for HLS delivery

You cannot set up segment duration for the HLS delivery method during provisioning when you create a new configuration. Segment duration automatically defaults to 10 seconds.

You can change the HLS segment duration on per-stream basis during playback. After you set up the set-akamai-hls-revision query string query string, you can change your segment duration using the set-segment-duration query string.

You can also use the set-segment-duration query string without specifying the set-akamai-hls-revision query string. If you specify the set-akamai-hls-revision query string, it enables all of the HLS spec compliance options.

Note: New segmentation relies on the encoder key frame interval. The key frame interval specification on the encoder and the segment duration set in the playback URL should be such that encoder key frame interval is the exact factor of segment duration.

The following table summarizes the recommended segment duration for HLS and query string values for them and possible key frame values on your live encoder to consider when you choose your segment duration for HLS.

Selecting segment duration
Segment duration (seconds) Query String Value to set up segment duration Optimized for Possible key frame values on live encoder
10 smoothest Smoothest streaming experience with low level of buffering incidents but it causes delay from live streaming. 1, 2, 10
6 quality Closer to real-time streaming but still favoring quality of delivery over delay. 1, 2, 6
4 responsive Low delay from live streaming; some quality degradation might occur. 1, 2, 4
Note:

Support for customer stream DVR/Playback is limited to 29.5 minutes if set-akamai-hls-revision > 1. If set-akamai-hls-revision = 1, DVR window is unlimited.

Setting segment duration to the recommended values does not guarantee the quality of streaming according to the description provided in the preceding table and might vary according to local network conditions.