I want to vertically center align the text on video no matter what the font size is. And possibly if it could be done using drawtext filter and subtitles filter as well for subtitles filter if anyone can guide how to move the lines few columns up.
I tried multiple [in]drawtext=...,drawtext=...[out] filter but when change the font size alignment goes wrong curious to know if there is some calculated formula to do this accurately.
[in]drawtext=font='Arial': text='This is text line 1':x=(w-tw)/2:y=((h-text_h)/2)-(text_h-(th/4)): fontsize=55: fontcolor=red, drawtext=font='Arial': text='This is text line 2':x=(w-tw)/2:y=((h-text_h)/2)+(text_h-(th/4)): fontsize=55: fontcolor=green[out]
The line height is based on (th/4) increase division number to decrease the line height or vice versa.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With