The example given in hls.sh accumulates a lot of files. Once the stream is started from a player, it starts playing back at the oldest part - which is far from "live" of what the camera sees.
Is there a way to change the segment-parts of ffmpeg to only have a slight lag?