Not only do I have multiple filters, I have multiple inputs that I want to overlay. I usually have to them in 2-3 steps and wonder how to do it all in one command as it should be the most efficient way?
1 and 2 literally identical. For readability, I've cut out the actual filters which are very long and complicated.
Take output3, text fade in (finish)
1)
ffmpeg -i input.mp4 -loop 1 -i image.jpg -filter_complex \
"[1]scale=640:-1[i0]; \
[i0]drawbox=color=white:t=15[i1]; \
[i1]format=,fade=[i2]; \
[i2]rotate=[i3]; \
[0][i3]overlay= \
-c:v libx264 -vb 10M output1.mp4
2)
ffmpeg -i output1.mp4 -loop 1 -i image2.jpg -filter_complex \
"[1]scale=[i0]; \
[i0]drawbox=[i1]; \
[i1]format=,fade=[i2]; \
[i2]rotate=[i3]; \
[0][i3]overlay=" \
-c:v libx264 -vb 10M output2.mp4
3)
ffmpeg -i output2.mp4 -i image3.jpg -filter_complex \
"[1]scale=1080:-1 [ovrl], \
[ovrl]format=fade=[i]; \
[0][i]overlay=" \
-c:v libx264 -vb 10M output4.mp4
4)
ffmpeg -i output4.mp4 -filter_complex "drawtext=" -vb 10M finaloutput.mp4
Use
ffmpeg -i input.mp4 -loop 1 -i image.jpg -loop 1 -i image2.jpg -loop 1 -i image3.jpg \
-filter_complex \
"[1]scale=640:-1,drawbox=color=white:t=15,format=,fade=,rotate=[i1]; \
[2]scale=,drawbox=,format=,fade=,rotate=[i2]; \
[3]scale=1080:-1,format=,fade=[i3]; \
[0][i1]overlay=shortest=1[o1]; \
[o1][i2]overlay=shortest=1[o2]; \
[o2][i3]overlay=shortest=1,drawtext=" \
-b:v 10M finaloutput.mp4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With