ffmpeg 命令大全

ffmpeg 命令大全 ffmpeg 命令大全 转容器
./ffmpeg -i xx.m3u8 -c copy -bsf:a aac_adtstoasc x.mkv

合并多个视频

创建一个文本文件filelist.txt。

 file 'f1.mkv'
 file 'f2.mkv'
 file 'f3.mkv'
 ffmpeg -f concat -i filelist.txt -c copy output.mkv

合并mp4视频改怎么合并呢?

ffmpeg + ts 蹦蹦蹦蹦~~,重磅推出终极解决方案。这个的思路是先将 mp4 转化为同样编码形式的 ts 流,因为 ts流是可以 concate 的,先把 mp4 封装成 ts ,然后 concate ts 流, 最后再把 ts 流转化为 mp4。

ffmpeg -i 1.mp4 -vcodec copy -acodec copy -vbsf h264_mp4toannexb 1.ts
ffmpeg -i 2.mp4 -vcodec copy -acodec copy -vbsf h264_mp4toannexb 2.ts
ffmpeg -i "concat:1.ts|2.ts" -acodec copy -vcodec copy -absf aac_adtstoasc output.mp4

文章来源:

Author:光宇
link:http://www.gyblog.cn/post/ffpmeg.html