0

I'm trying to work out how to combine both features of the following in one -filter_complex statement in order to take an image, write some text on it, and then do an additive composite of a small video to an area of the image. Every time I try to combine these two things it doesn't work!

ffmpeg -loop 1 -i mic720x1280.png -vf drawtext="fontfile=Montserrat-Bold.ttf: text='Hello': fontcolor=white: fontsize=44: box=1: boxcolor=black@0.5: boxborderw=10: x=(w-text_w)/2: y=100" -c:v libx264 -t 15 -pix_fmt yuv420p myvid.mp4
-vf "movie=waves5.mp4, scale=500:-1 [inner]; [in][inner] overlay=70:70 [out]"
0

Edited to change to additive blend.

Use

ffmpeg -loop 1 -i mic720x1280.png -i waves5.mp4 -filter_complex "color=0x000000@0,format=gbrap[bg];[0]format=gbrap,drawtext=fontfile=Montserrat-Bold.ttf: text='Hello': fontcolor=white: fontsize=44: box=1: boxcolor=black@0.5: boxborderw=10: x=(w-text_w)/2: y=100,setsar=1[img];[bg][img]scale2ref[bg][img];[bg]setsar=1[bg];[1]scale=500:-1,format=gbrap[vid];[bg][vid]overlay=70:70:format=rgb[vidbl];[vidbl][img]blend=all_mode=addition" -c:v libx264 -t 15 -pix_fmt yuv420p myvid.mp4

  • Hi, thankyou so much, this is fantastic, however finally how do I make the last [img][vid] an additive composite blend rather than a plain overlay? – user3342298 Apr 1 at 22:36
  • (thanks for your wonderful help though :) ) – user3342298 Apr 1 at 22:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.