[英]How to use ffmpeg merge all the videos in the catalog in an orderly manner?
I have a lot of regular video clips 1.mp4 2.mp4 ... 11.mp4我有很多常规视频剪辑 1.mp4 2.mp4 ... 11.mp4
I use command below to combine all the clips:我使用下面的命令来组合所有剪辑:
ffmpeg -f concat -safe 0 -i <(for f in ./*.mp4; do echo "file '$PWD/$f'"; done) -c copy -pix_fmt yuv420p -r 30 all.mp4
But the sequence will be disordered, For example, the file #1 is not file #2, but file #11。但是顺序会乱,比如文件#1不是文件#2,而是文件#11。
how can I correctly merge according to the number size sequence?如何根据数字大小序列正确合并?
添加 sort -V 如下:
ffmpeg -f concat -safe 0 -i <(for f in ./*.webm; do echo "file '$PWD/$f'"; done | sort -V) -c copy -pix_fmt yuv420p -r 30 output.webm
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.