How to create an m3u8 playlist from a list of mp4 files?

Here is the solution to your problem just follow the steps given below:
• Just combine all the mp4 files into a single mp4 file using FFmpeg Concat filter.
• Run the highlighted command (segment format) which takes the mp4 file as input and provides m3u8 as output.

Refer: