Alex Gurr
Alex Gurr

Reputation: 543

Positioning an overlay produces a different outcome to drawtext with ffmpeg

I have an image overlay I'm positioning using the equation: overlay=1015:(((H-h)/2) + 225 + 60) which works as expected.

However, when I try and apply this to drawtext x=1045:y=(((H-h)/2) + 225 + 60) it doesn't position at the same y coordinate?

Are there any nuances people know about?

Thanks.

Upvotes: 0

Views: 38

Answers (1)

Gyan
Gyan

Reputation: 93058

The overlay and drawtext filters have different variable names.

Assuming you mean H to refer to the height of the frame and h and the height of the text, you would replace h with th. Both H and h refer to the frame height in drawtext.

x=1045:y=(((H-th)/2) + 225 + 60)

Upvotes: 1

Related Questions