How to add lower third text graphics to a video using FFmpeg I'm trying to add text to my video. Something like this:



So far I've tried this command, but the text doesn't wrap:

ffmpeg -i input.mp4 -vf \
"format=yuv444p, \
drawbox=y=ih/PHI:color=black@0.4:width=iw:height=48:t=fill, \
drawtext=fontfile=OpenSans-Regular.ttf:text='Title of this    Video':fontcolor=white:fontsize=24:x=(w-tw)/2:y=(h/PHI)+th, \
format=yuv420p" \
-c:v libx264 -c:a copy -movflags +faststart output.mp4
The drawtext filter doesn't support automatic wrapping.

So, if you want to display your text in n lines, you have to use the drawtext filter n times, with different values for parameters text, y (and maybe x, too) for every line.