[FFmpeg-user] Drawtext text placement problems

Nicolas George nicolas.george at normalesup.org
Thu Jan 17 12:09:41 CET 2013

Le septidi 27 nivôse, an CCXXI, Malcom Moody a écrit :
> I know FFmpeg cannot right justify text, but is there a way to obtain the
> pixel length of the string so I can give the position where the line of
> text should start?

The answer to your question is in the documentation:

           main_w, main_h
               main input width and height

           text_w, text_h
               rendered text width and height


There are even examples doing almost what you want:

#  Draw a single green letter "g", at the center of the input video. The
#  glyph baseline is placed at half screen height.

  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20130117/ad4e7c60/attachment.asc>

More information about the ffmpeg-user mailing list