I am generating an animated gif from a series of png's labeled img_00.png, img_01.png, etc. I want to insert text to the top right corner of the animated gif for each frame that is generated from the png to display some specific information. For example say I have 3 pngs, img_00, img_01, and img_02...what I want from the gif is:
For frame generated from img_00, display "This is from img_00".
For frame generated from img_01, display "This is from img_01".
For frame generated from img_02, display "This is the last image generated from img_02!".
So far I have been messing around with drawtext option (assuming framerate=1):
ffmpeg -f image2 -framerate 1 -i img_%02d.png -filter_complex "drawtext=enable='between(t,0,1)':text='word1':fontsize=24:fontcolor=white:x=w-tw:y=0,drawtext=enable='between(t,1,2)':text='word2':fontsize=24:fontcolor=white:x=w-tw:y=0" out.gif
But I am getting "word1" and "word2" overlapped on top of each other. Is there a better way of doing this or someway to fix drawtext so the overlap doesn't happen?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…