The tool used is ffmpeg:
ffmpeg official website: http://ffmpeg.org/download.html
ffmpeg download address: https://ffmpeg.zeranoe.com/builds/
After downloading, configure the bin directory to the environment variable. You can use the relevant commands.
先用ffmpeg把abc.mp4文件转换为abc.ts文件:
ffmpeg -y -i abc.mp4 -vcodec copy -acodec copy -vbsf h264_mp4toannexb abc.ts
再用ffmpeg把abc.ts文件切片并生成playlist.m3u8文件,5秒一个切片:
ffmpeg -i abc.ts -c copy -map 0 -f segment -segment_list playlist.m3u8 -segment_time 5 abc%03d.ts
Post: https://www.cnblogs.com/xiezhidong/p/6924775.html
The command to convert to ts:
https://blog.csdn.net/yygydok/article/details/80051262