Opened 7 months ago

Closed 7 months ago

Last modified 7 months ago

#10632 closed defect (invalid)

vf_drawtext filter text align does not allows set both horizontal and vertical align

Reported by: Ivan A. Shmakov Owned by:
Priority: normal Component: avfilter
Version: git-master Keywords: drawtext
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: yes

Description

Summary of the bug:

vf_drawtext filter text align does not allows set both horizontal and vertical align at same time

text_align=center - allows
text_align=middle - allows
text_align=C - allows
text_align=M - allows

text_align=center|middle - not allows
text_align=CM - not allows
text_align=C|M - not allows

And could you say what format should be correct - CM or С|M and center|middle?

How to reproduce:

% ./ffmpeg -y -i ./in.avi -vf "drawtext=text='My text starting at 640x360':x=(w-text_w)/2: y=(h-text_h-line_h)/2:fontsize=10:fontcolor=white:box=1:boxborderw=5:boxcolor=#00ff00:boxw=100:boxh=20:text_align=middle|center" -c:a copy output.mp4

ffmpeg version
built on master

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

Change History (5)

comment:1 by Ivan A. Shmakov, 7 months ago

to set both verical and horizontal text align it's allows text_align=15

bit flags of:

enum text_alignment {

TA_LEFT = (1 << 0),
TA_RIGHT = (1 << 1),
TA_TOP = (1 << 2),
TA_BOTTOM = (1 << 3),

};

But I think it's required to set in text format too. By the way could you say what format should be correct - CM or С|M and center|middle?

comment:2 by Ivan A. Shmakov, 7 months ago

Component: undeterminedavfilter

comment:3 by Elon Musk, 7 months ago

Resolution: invalid
Status: newclosed

Options are flags, flags are set via +, so C+M+L+T

in reply to:  3 comment:4 by Michael Koch, 7 months ago

Replying to Elon Musk:

Options are flags, flags are set via +, so C+M+L+T

That's missing in documentation.

comment:5 by Elon Musk, 7 months ago

Only if you are too ignorant to search.

Note: See TracTickets for help on using tickets.