且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

结合多个mp4视频和图像

更新时间:2023-01-25 16:15:34

对于每个图像,运行

ffmpeg -i image -f lavfi -i anullsrc -r 60 -pix_fmt yuv420p -ac 2 -ar 44100 -video_track_timescale 90k -t 3 image.mp4

然后创建一个文本文件,

Then create a text file,

file img1.mp4
file 1.mp4
file img2.mp4
file 2.mp4
...etc

然后运行

ffmpeg -f concat -i list.txt -c copy out.mp4

整个过程假设MP4具有相同的属性,例如分辨率.等.

This whole process assumes that the MP4s have the same properties, like resolution..etc.