[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

http://ffmpeg.org/ffmpeg-filters.html#drawtext-1

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.
 
Regards,

-- 
  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