1

When I am using following command to convert .mp4 15 second video to .m3u8 format with hls_time 1 it convert in 15 .ts files using ffmpeg after successful conversation but when open the out.m3u8 file I Found only last four .ts file in out.m3u8 instead of 15 .ts files entries, please help what should I do for getting all 15 files in out.m3u8

ffmpeg -i video.mp4 -c:v h264 -flags +cgop -g 30 -hls_time 1 out.m3u8

1 Answer 1

4

The HLS muxer defaults to creating a playlist with a sliding window of hls_list_size items (default: 5).

To keep all segments you can set the output parameter hls_playlist_type to either vod or event depending on your use case, which forces the hls_list_size to 0 (keep all segments). In your case you need vod.

The documentation can be found here.

1
  • thanks for this, due to some misunderstanding, I am doing with different way, but after your suggestion I am on a write way. Nov 30, 2020 at 10:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.