running:
bash create-vod-hls.sh beach.mkv
will produce:
beach/
|- playlist.m3u8
|- 360p.m3u8
|- 360p_001.ts
|- 360p_002.ts
|- 480p.m3u8
|- 480p_001.ts
|- 480p_002.ts
|- 720p.m3u8
|- 720p_001.ts
|- 720p_002.ts
|- 1080p.m3u8
|- 1080p_001.ts
|- 1080p_002.ts
origin: http://docs.peer5.com/guides/production-ready-hls-vod/
This is my extended version of this script that supports auto generate bitrates based on video source resolution, and handle cases when video after scaling has dimensions are not divisible by 2 that will cause error at run time.
Link: https://gist.github.com/maitrungduc1410/9c640c61a7871390843af00ae1d8758e