滤镜描述
drawtext
官网链接 =》 FFmpeg Filters Documentation
这个滤镜可以给视频添加上文本,可以给文本加边框、颜色、阴影。注意不是字幕功能,因为这个滤镜不能精准的控制开始和结束的时间。
滤镜使用
参数
fontfile <string> ..FV....... set font file
text <string> ..FV.....T. set text
textfile <string> ..FV....... set text file
fontcolor <color> ..FV.....T. set foreground color (default "black")
fontcolor_expr <string> ..FV....... set foreground color expression (default "")
boxcolor <color> ..FV.....T. set box color (default "white")
bordercolor <color> ..FV.....T. set border color (default "black")
shadowcolor <color> ..FV.....T. set shadow color (default "black")
box <boolean> ..FV.....T. set box (default false)
boxborderw <string> ..FV.....T. set box borders width (default "0")
line_spacing <int> ..FV.....T. set line spacing in pixels (from INT_MIN to INT_MAX) (default 0)
fontsize <string> ..FV.....T. set font size
text_align <flags> ..FV.....T. set text alignment (default 0)
left ..FV.....T.
L ..FV.....T.
right ..FV.....T.
R ..FV.....T.
center ..FV.....T.
C ..FV.....T.
top ..FV.....T.
T ..FV.....T.
bottom ..FV.....T.
B ..FV.....T.
middle ..FV.....T.
M ..FV.....T.
x <string> ..FV.....T. set x expression (default "0")
y <string> ..FV.....T. set y expression (default "0")
boxw <int> ..FV.....T. set box width (from 0 to INT_MAX) (default 0)
boxh <int> ..FV.....T. set box height (from