1.首先安装ffmpeg,
2.运行命令:ffmpeg -threads 4 -i c:/1.mp4 -vcodec libx264 -f hls -hls_time 300 -hls_list_size n c:/output.m3u8 ,
hls -hls_time 300 是设置的每个ts视频文件的时长(单位秒),一般最好不要设置太大
3.PC端需通过能播放m3u8的播放器进行播放(如:ckplayer等)
1.首先安装ffmpeg,
2.运行命令:ffmpeg -threads 4 -i c:/1.mp4 -vcodec libx264 -f hls -hls_time 300 -hls_list_size n c:/output.m3u8 ,
hls -hls_time 300 是设置的每个ts视频文件的时长(单位秒),一般最好不要设置太大
3.PC端需通过能播放m3u8的播放器进行播放(如:ckplayer等)
转载于:https://my.oschina.net/u/2367476/blog/886033