Add text with FFMpeg drawtext at specific time

帅比萌擦擦* 提交于 2019-12-30 13:31:46

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!