ffmpeg使用

用MP4中制作M3U8:

ffmpeg -i myVideo.mp4 -c copy -bsf h264_mp4toannexb output.ts
ffmpeg -i output.ts -c copy -map 0 -f segment -segment_list playlist.m3u8 -segment_time 5 output%03d.ts
ffmpeg -i 'D:\installedHome\video\2025.mp4' -c:v  libx264 -c:a aac  -f hls -hls_time 10 -hls_list_size 0 output.m3u8


从M3U8转回MP4:

ffmpeg -i (M3U8_URL_ADDRESS) -c copy D:\OutputVideo\output.mp4
ffmpeg -i playlist.m3u8 -c copy D:\OutputVideo\output.mp4

 

posted @ 2025-10-17 19:46  人海中的海盗  阅读(2)  评论(0)    收藏  举报