[FFmpeg-user] center-align multiple text lines

Michael Koch astroelectronic at t-online.de
Sun Apr 12 00:03:31 EEST 2020


Hello,

I want to show the content of a credits file scrolling up.The file 
contains many lines of different lengths.

drawtext=textfile=credits.txt:x=(w-text_w)/2:y=h-100*t

The variable text_w is the width of the longest line in the text file. 
This line is center-aligned in the frame, and all other (shorter) lines 
are left-aligned to the same X position as the longest line.
But that's not what I want. Is it somehow possible that each line is 
center-aligned?

Michael


More information about the ffmpeg-user mailing list