Disk management

For HLS ingest, the DiskManagementDuration configuration is ignored. Incoming m3u8 should specify the duration in which the fragments are retained on the disk. The related HLS specification mandates the following:

"When the server removes a media segment from the Playlist, the corresponding media URI SHOULD remain available to clients for a period of time equal to the duration of the segment plus the duration of the longest Playlist file distributed by the server containing that segment."

To meet this requirement, the duration in which fragments are retained in the disk is calculated using the following formula:

Retention duration of fragments = 2 * m3u8 sliding window duration + Target Duration

For trick-play m3u8 generated by encoder or external source, segment entries in the trick-play can be byte range references of the segments in the main m3u8. For such trick-play m3u8s, the following conditions must be met for disk management to work: