According to the ffmpeg documentation, the playlist defaults to 5 entries and a segment duration of 2 seconds. This probably explains why you are only seeing a limited number of entries in the playlist. Try setting the length of the playlist (-hls_list_size
) to 0, which will include all the segments. Apple recommends a segment duration of 10 seconds. You can set the segment duration with the -hls_time
option.
For reference, you can also use the segment muxer. Here's the command I usually use when segmenting video with ffmpeg:
ffmpeg -y \
-i input.mov \
-codec copy \
-bsf h264_mp4toannexb \
-map 0 \
-f segment \
-segment_time 10 \
-segment_format mpegts \
-segment_list "/Library/WebServer/Documents/vod/prog_index.m3u8" \
-segment_list_type m3u8 \
"/Library/WebServer/Documents/vod/fileSequence%d.ts"
In this instance, the input video contains H.264 video and AAC audio so it doesn't need to be transcoded.