我将多张图片依次处理,每张图片生成一段小视频,有各自的时长和效果,把这些小视频合成一个完整视频的时候出现问题,每张图片的播放时长跟原先的小视频时长不一样,有的变短,有的变长,求大神告知如何解决,下面是脚本
/usr/local/ffmpeg/bin/ffmpeg -y -loop 1 -r 30 -i /Users/lk/Desktop/file/im00001.jpg -t 00:00:03 -s 1280x720 -b:v 2048k -vcodec mpeg4 text1.mp4
/usr/local/ffmpeg/bin/ffmpeg -i text1.mp4 -vf "drawtext=text=FIIISH:fontfile=/Library/Fonts/Arial.ttf:x=20:y=20:fontsize=44:enable='gte(t,1)'" -t 00:00:03 -vcodec mpeg4 -b:v 2048k -y 1.mp4
/usr/local/ffmpeg/bin/ffmpeg -y -i 1.mp4 -vf fade=in:0:25 -s 1280x720 -t 00:00:03 -vcodec mpeg4 -b:v 2048k fade_1.mp4
/usr/local/ffmpeg/bin/ffmpeg -y -loop 1 -r 30 -i /Users/lk/Desktop/file/im00002.jpg -t 00:00:02 -s 1280x720 -b:v 2048k -vcodec mpeg4 2.mp4
/usr/local/ffmpeg/bin/ffmpeg -y -i 2.mp4 -vf "scale=8000:-1,zoompan=z='zoom+0.001':s='1280*720'" -s 1280x720 -t 00:00:02 -b:v 2048k -vcodec mpeg4 fade_2.mp4
/usr/local/ffmpeg/bin/ffmpeg -y -loop 1 -r 30 -i /Users/lk/Desktop/file/im00003.jpg -t 00:00:03 -s 1280x720 -b:v 2048k -vcodec mpeg4 3.mp4
/usr/local/ffmpeg/bin/ffmpeg -y -i 3.mp4 -vf fade=out:70:20:c=white -b:v 2048k -t 00:00:03 -s 1280x720 -vcodec mpeg4 fade_3.mp4
/usr/local/ffmpeg/bin/ffmpeg -y -loop 1 -r 30 -i /Users/lk/Desktop/file/im00004.jpg -t 00:00:02 -s 1280x720 -b:v 2048k -vcodec mpeg4 4.mp4
/usr/local/ffmpeg/bin/ffmpeg -y -i 4.mp4 -vf fade=in:0:25 -s 1280x720 -t 00:00:02 -b:v 2048k -vcodec mpeg4 fade_4.mp4
/usr/local/ffmpeg/bin/ffmpeg -y -loop 1 -r 30 -i /Users/lk/Desktop/file/im00005.jpg -t 00:00:02 -s 1280x720 -b:v 2048k -vcodec mpeg4 5.mp4
/usr/local/ffmpeg/bin/ffmpeg -y -i 5.mp4 -vf "scale=8000:-1,zoompan=z='zoom+0.001':s='1280*720'" -s 1280x720 -t 00:00:02 -b:v 2048k -vcodec mpeg4 fade_5.mp4
/usr/local/ffmpeg/bin/ffmpeg -y -loop 1 -r 30 -i /Users/lk/Desktop/file/im00006.jpg -t 00:00:03 -s 1280x720 -b:v 2048k -vcodec mpeg4 6.mp4
/usr/local/ffmpeg/bin/ffmpeg -y -i 6.mp4 -vf "scale=8000:-1,zoompan=z='zoom+0.001':s='1280*720'" -s 1280x720 -t 00:00:03 -b:v 2048k -vcodec mpeg4 fade_6.mp4
/usr/local/ffmpeg/bin/ffmpeg -y -loop 1 -r 30 -i /Users/lk/Desktop/file/im00007.jpg -t 00:00:02 -s 1280x720 -b:v 2048k -vcodec mpeg4 7.mp4
/usr/local/ffmpeg/bin/ffmpeg -y -i 7.mp4 -vf "scale=8000:-1,zoompan=z='zoom+0.001':s='1280*720'" -s 1280x720 -t 00:00:02 -b:v 2048k -vcodec mpeg4 fade_7.mp4
/usr/local/ffmpeg/bin/ffmpeg -y -loop 1 -r 30 -i /Users/lk/Desktop/file/im00008.jpg -t 00:00:02 -s 1280x720 -b:v 2048k -vcodec mpeg4 8.mp4
/usr/local/ffmpeg/bin/ffmpeg -y -i 8.mp4 -vf "scale=8000:-1,zoompan=z='if(lte(zoom,1.0),1.5,max(1.001,zoom-0.0015)):s='1280*720'" -t 00:00:02 -b:v 2048k -vcodec mpeg4 fade_8.mp4
/usr/local/ffmpeg/bin/ffmpeg -y -loop 1 -r 30 -i /Users/lk/Desktop/file/im00009.jpg -t 00:00:03 -s 1280x720 -b:v 2048k -vcodec mpeg4 9.mp4
/usr/local/ffmpeg/bin/ffmpeg -y -i 9.mp4 -vf "scale=8000:-1,zoompan=z='zoom+0.001':s='1280*720'" -s 1280x720 -t 00:00:03 -b:v 2048k -vcodec mpeg4 fade_9.mp4
/usr/local/ffmpeg/bin/ffmpeg -y -loop 1 -r 30 -i /Users/lk/Desktop/file/im00010.jpg -t 00:00:02 -s 1280x720 -b:v 2048k -vcodec mpeg4 10.mp4
/usr/local/ffmpeg/bin/ffmpeg -y -i 10.mp4 -vf "scale=8000:-1,zoompan=z='if(lte(zoom,1.0),1.5,max(1.001,zoom-0.0015))':s='1280*720'" -t 00:00:02 -b:v 2048k -vcodec mpeg4 fade_10.mp4
/usr/local/ffmpeg/bin/ffmpeg -y -loop 1 -r 30 -i /Users/lk/Desktop/file/im00011.jpg -t 00:00:03 -s 1280x720 -b:v 2048k -vcodec mpeg4 11.mp4
/usr/local/ffmpeg/bin/ffmpeg -y -i 11.mp4 -vf fade=out:60:30 -t 00:00:03 -s 1280x720 -b:v 2048k -vcodec mpeg4 fade_11.mp4
/usr/local/ffmpeg/bin/ffmpeg -f concat -i files.txt -c copy -y -b:v 4096k -vcodec mpeg4 myvideo.mp4
|