在特定时间使用FFMpeg drawtext添加文本 [英] Add text with FFMpeg drawtext at specific time

查看:1326
本文介绍了在特定时间使用FFMpeg drawtext添加文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将文本添加到动画GIF中.

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.

这就是我所拥有的:

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'

我尝试了不同的方法,但是似乎没有任何效果.我可以使用-itsoffset 00:00:30之类的东西来控制视频的计时,但不能使用文本.

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.

推荐答案

您必须使用时间轴编辑.

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

这篇关于在特定时间使用FFMpeg drawtext添加文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆