【发布时间】:2018-05-31 15:51:48
【问题描述】:
我正在使用 drawtext 过滤器从文本创建视频。输出视频我可以看到文本溢出而不是换行。
有什么方法可以存档自动换行并将内部填充设置为视频?
下面是我用来从文本生成视频的 sn-p
ffmpeg.exe -f lavfi -i color=c=white:s=640x480:d=5.396 -vf "[in] drawtext=fontfile=font.ttf:fontsize=20:fontcolor=black:x=0+0*print(tw):y=0+0*print(th):text='this is new whiteboard te':enable='between(t,6.634,6.818)',drawtext=fontfile=font.ttf:fontsize=20:fontcolor=black:x=0+0*print(tw):y=0+0*print(th):text='this is new whiteboard testing':enable='between(t,0.0,2.032)',drawtext=fontfile=font.ttf:fontsize=20:fontcolor=black:x=0+0*print(tw):y=0+0*print(th):text='this is new whiteboard testing no padding and the text is overflowing from the video frame check this need to acheve word wrapping':enable='between(t,2.032,5.396)'"[out] -c:v libx264 -t 30 -crf 30 ../output.mp4
【问题讨论】: