nkkollaw
nkkollaw

Reputation: 2050

Add text with FFMpeg drawtext at specific time

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.

Upvotes: 3

Views: 9376

Answers (1)

Gyan
Gyan

Reputation: 93329

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)''

Upvotes: 9

Related Questions