I am working on a project and am following https://gist.github.com/mrbar42/ae111731906f958b396f30906004b3fa to convert a mp4 file to a HLS m3u8 playlist. So far everything worked out. What I am trying to do now is an optimisation of the stream such that initial segment(s) can be of smaller size than the rest of them.
What I have already tried is:
hls_init_time
, as per the documentation, this flag does the job. But when I say-hls_playlist_type vod
, it forceshls_list_size
to be 0 (again, as per the documentation). It made sense to me cause in a VOD, the playlist/manifest should have this info available always (cmiiw).- played with ffmpeg and bash commands to get the playlist in the desired format, i.e. have segments with variable lengths. As a result, the video had an added pause after the variable segments (before the lengthier segments started to play).
looks like a std problem What I am stuck at is:
- Is this even possible to have segments in the m3u8 file with variable length?
- Is there any other way I can achieve the above mentioned optimisation (changing playlist type/passing some other existing flag)?