ffmpeg文件切片

先用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也能夠直接將.mp4文件直接轉換windows環境直接指向路徑 ffmpeg -i G:\text\1.mp4 -c copy -map 0 -f segment -segment_list G:\text\playlist.m3u8 -segment_time 5 G:\text\abc%03d.ts
相關文章
相關標籤/搜索