生成m3u8文件&切片
ffmpeg -i out.mp4 -vbsf h264_mp4toannexb -vcodec copy -acodec aac -strict 2 -g 150 -hls_time 20 -hls_list_size 0 -start_number 0 -f hls -y out.m3u8
新版本
ffmpeg -i out.mp4 -bsf:v h264_mp4toannexb -vcodec copy -acodec aac -strict 2 -g 150 -hls_time 20 -hls_list_size 0 -start_number 0 -f hls -y out.m3u8
参数
# hls_segment_filename 设置ts文件名
ffmpeg -i in.nut -hls_segment_filename 'file%03d.ts' out.m3u8