[FFmpeg-user] Control spacing between multiple lines with drawtext filter

Schuyler Cullen scullen at gmail.com
Fri May 4 21:10:01 CEST 2012


Hello All,

I'm trying to use the drawtext filter to render multiple lines of text on a
video, but the lines come out spaced too closely together, in fact the
spacing seems to be zero. Is anyone aware of a way to control the line
spacing with this filter?

You can see what I mean by running this experiment and looking at the
results:

$ cat /tmp/txt
LINE ONE
LINE TWO

$ ffmpeg -i BigBuckBunny_512kb.mp4 -an -vcodec libx264 -preset fast -vf
"drawtext=fontfile=/usr/share/fonts/truetype/msttcorefonts/Arial_Bold.ttf:
textfile=/tmp/txt: x=2*max_glyph_w:y=0.85*h-line_h" -t 10 -f mp4 -y out.mp4

Regards,
Schuyler


More information about the ffmpeg-user mailing list