TL;DR
-hls_time 6 is a request, not a guarantee. We'll reproduce the bug on a test clip, fix it with three encoder flags, and write a ~75 line Python audit that checks a playlist against RFC 8216 and Apple's HLS authoring rules.
Most HLS pipelines set the segment length once and never look again. The playlist can disagree with your config and everything still plays, so nothing alerts. #video #ffmpeg
We'll need ffmpeg 6.x or newer , ffprobe , and python 3.10+ . Everything runs locally.
1. π₯ Make a test clip
# a 60 s, 720p, 24 fps synthetic clip with a sine tone ffmpeg -y -f lavfi -i "testsrc2=size=1280x720:rate=24:duration=60" \ -f lavfi -i "sine=frequency=440:duration=60" \ -c :v libx264 -preset veryfast -pix_fmt yuv420p -c :a aac -shortest src.mp4
Enter fullscreen mode
Exit fullscreen mode
2.β¦