问题
I'm adding text to an animated GIF.
I would like the text to appear at a specific time, though, and I'm unable to do that.
This is what I have:
ffmpeg -i image.gif -vf 'drawtext=textfile=/path/to/text.txt:x=0:y=0:fontfile=/path/to/font.ttf:fontsize=64:fontcolor=white:borderw=3:bordercolor=black:box=0'
I tried different approaches, but nothing seems to work. I can manipulate timing for the video using things like -itsoffset 00:00:30
, but not the text.
回答1:
You have to use timeline editing.
-vf 'drawtext=textfile=/path/to/text.txt:x=0:y=0:fontfile=/path/to/font.ttf:fontsize=64:fontcolor=white:borderw=3:bordercolor=black:box=0:enable='between(t,23,31)''
来源:https://stackoverflow.com/questions/43448585/add-text-with-ffmpeg-drawtext-at-specific-time