Web Development

/ 0评 / 0/ 最后更新:2021-12-09
mp4转m3u8

方案一(简单效率低)

ffmpeg -i test.mp4 -c:v libx264 -hls_time 15 -hls_list_size 0 -c:a aac -strict -2 -f hls test.m3u8

方案二(效率高)

ffmpeg -y -i test.mp4  -vcodec copy -acodec copy -vbsf h264_mp4toannexb test.ts
ffmpeg -i test.ts -c copy -map 0 -f segment -segment_list test.m3u8 -segment_time 15 15s_%3d.ts

0

Leave a Reply

Your email address will not be published. Required fields are marked *