ffmpeg 拼接视频报错,Found duplicated MOOV Atom. Skipped
使用concat协议进行拼接两个mp4视频,报错:“Found duplicated MOOV Atom. Skipped”。
ffmpeg -i "concat:1.mp4|2.mp4" -c copy output.mp4
原理上是因为 concat协议,实际上就只是把两个视频直接拼接,把后一个视频直接贴到前一个视频后面而已,因此只会适用于ts和flv等一些格式。mp4格式整体有一层容器,需要先解开容器再对提取的视频流进行拼接。
解决方法:
创建一个list.txt文件如下:
file '/path/1.mp4'file '/path/2.mp4'file '/path/3.mp4'
执行下面的命令
ffmpeg -f concat -safe 0 -i list.txt -c copy output.mp4