[FFmpeg-trac] #9427(avfilter:new): Wrong vertical alignment in drawtext

FFmpeg trac at avcodec.org
Sat Sep 18 20:16:41 EEST 2021


#9427: Wrong vertical alignment in drawtext
--------------------------------------+------------------------------------
             Reporter:  Michael Koch  |                    Owner:  (none)
                 Type:  defect        |                   Status:  new
             Priority:  normal        |                Component:  avfilter
              Version:  git-master    |               Resolution:
             Keywords:                |               Blocked By:
             Blocking:                |  Reproduced by developer:  0
Analyzed by developer:  0             |
--------------------------------------+------------------------------------
Description changed by Michael Koch:

Old description:

> It's impossible to print several strings with drawtext in the same line.
> The vertical alignment depends on which characters are in the string. Can
> be reproduced as follows, case 1 without using "text_h":
>
> ffmpeg -f lavfi -i color=yellow -lavfi
> drawtext=text='a_':x=20:y=50,drawtext=text='_gG':x=40:y=50,drawtext=text='``':x=60:y=50
> -frames 1 -y out1.png
>
> Case 2 with "text_h" subtracted:
>
> ffmpeg -f lavfi -i color=yellow -lavfi
> drawtext=text='a_':x=20:y=50-text_h,drawtext=text='_gG':x=40:y=50-text_h,drawtext=text='``':x=60:y=50-text_h
> -frames 1 -y out2.png
>
> In both cases the vertical alignment of the strings is wrong.

New description:

 It's impossible to print several strings with drawtext in the same line.
 The vertical alignment depends on which characters are in the string. Can
 be reproduced as follows, case 1 without using "text_h":

 ffmpeg -f lavfi -i color=yellow -lavfi
 drawtext=text='a_':x=20:y=50,drawtext=text='_gG':x=40:y=50,drawtext=text='^^':x=60:y=50
 -frames 1 -y out1.png

 Case 2 with "text_h" subtracted:

 ffmpeg -f lavfi -i color=yellow -lavfi
 drawtext=text='a_':x=20:y=50-text_h,drawtext=text='_gG':x=40:y=50-text_h,drawtext=text='^^':x=60:y=50-text_h
 -frames 1 -y out2.png

 In both cases the vertical alignment of the strings is wrong.

--
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/9427#comment:1>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list