########################################################################################## HLS-26: Ability to override WRAP_POINT ########################################################################################## Issue Type: Sub-task ----------------------------------------------------------------------------------------- Issue Information ==================== Priority: Major Status: Open Resolution: Unresolved Project: HLS Stream Creator (HLS) Reported By: btasker Assigned To: btasker Child of: HLS-25 - Additional flags/features to aid Low Latency Streaming Components: - Linear Support - CLI Options Targeted for fix in version: - VNEXT Labels: Linear, Segments, UltraLowLatency, Time Estimate: 180 minutes Time Logged: 0 minutes ----------------------------------------------------------------------------------------- Issue Description ================== When creating a live stream, the point at which to start re-using segment names is currently automatically calculated on line 343 and set as WRAP_POINT. It only fires if the script has been told to limit the number of segments in the manifest (by way of the -c flag) -- BEGIN SNIPPET -- if [ "$LIVE_SEGMENT_COUNT" -gt 0 ] then WRAP_POINT=$(($LIVE_SEGMENT_COUNT * 2)) # Wrap the segment numbering after 2 manifest lengths - prevents disks from filling FFMPEG_ADDITIONAL+=" -segment_list_size $LIVE_SEGMENT_COUNT -segment_wrap $WRAP_POINT" fi -- END SNIPPET -- When WRAP_POINT is reached, segment filenames will reset, so we might see - stream_00001.ts - stream_00002.ts - stream_00003.ts - stream_00004.ts - stream_00005.ts - stream_00006.ts - stream_00001.ts For standard latency HLS streams this will generally be fine, however, for ultra-low latency HLS streams we risk recycling names before the TTL on any downstream HTTP caches has expired. Due to the very short segment length you risk increasing cache churn if the TTL is lowered too much (and also meaning that if a player gets a bit behind, it may well start skipping) So, I'd like to add a flag (-w) that allows WRAP_POINT to be explicitly defined (and if it isn't present, stick with the existing method of calculation), as well as perhaps having the ability to tell it _never_ to wrap (though, as it stands, that would mean the older segments are never removed from disk - that might be desirable if you're intending to republish as VOD later though). ----------------------------------------------------------------------------------------- Issue Relations ================ - Line 343 (https://github.com/bentasker/HLS-Stream-Creator/blob/40dc4fca5c0364ea9887ebd3b70ac7be3b7aaf04/HLS-Stream-Creator.sh#L343) ----------------------------------------------------------------------------------------- Activity ========== ----------------------------------------------------------------------------------------- 2019-11-23 12:09:18 ----------------------------------------------------------------------------------------- btasker added 'VNEXT' to Fix Version ----------------------------------------------------------------------------------------- 2019-11-23 12:09:18 ----------------------------------------------------------------------------------------- btasker removed '1.0' from Fix Version