我可以在ffmpeg上创建滚动文字:
ffmpeg -y -f lavfi -i color=c=black:s=800x450:d=125 -vf "[in]drawtext=fontfile=Futura.ttc:fontsize=40:fontcolor=#444444:x=w-(200*t):y=((h)/2):text='Ha Ha Ha'[out]" -c:v libx264 -t 5 scrolling.mp4
当文本位于屏幕中间或((w-w_text)/ 2)时,如何使文本停止?
我尝试使用lte()函数。正如ffmpeg - how does moving overlay / text command work?
所建议的那样ffmpeg -y -f lavfi -i color=c=black:s=800x450:d=125 -vf "[in]drawtext=fontfile=Futura.ttc:fontsize=40:fontcolor=#444444:x=lte(w-(200*t), (w-w_text)/2):y=((h)/2):text='HA HA HA'[out]" -c:v libx264 -t 5 scrolling.mp4
出现错误:
Either text, a valid file or a timecode must be provided
Error initializing filter 'drawtext' with args 'fontfile=Futura.ttc:fontsize=40:fontcolor=#444444:x=lte(w-(200*t)'