Opened 5 years ago

Closed 5 years ago

#541 closed defect (invalid)

Constant in drawtext not working

Reported by: offset8 Owned by:
Priority: important Component: avfilter
Version: 0.8.5 Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

I'm trying to use some constants in x= and y= parameters as explained in the documentation.
But none working. Always get the following message :

drawtext @ 0x23774e0] [Eval @ 0x7fff82a777b0] Undefined constant or missing '(' in 'h/2)'
[drawtext @ 0x23774e0] Unable to parse option value "(h/2)"
[drawtext @ 0x23773e0] Error parsing options string: 'fontsize=40:fontcolor=white@1:box=1:boxcolor=black@0.2:fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf:text=hello:x=50:y=(h/2)'

Command line :

$ ffmpeg-0.8.5 -i test.mp4 -vf 'drawtext=fontsize=40:fontcolor=white@1:box=1:boxcolor=black@0.2:fontfile=/usr/share/fonts/truetype/freefont/FreeSerif.ttf:text=hello:x=50:y=(h/2)' -s 800x600 -b 2000k -ss 60 test.mpg

Change History (1)

comment:1 Changed 5 years ago by saste

  • Resolution set to invalid
  • Status changed from new to closed

That feature was added in libavfilter 2.43.5, commit 482ce0ce4ec558db5a951718bcd7a9c01d0afb36, and is not part of the 0.8.5 branch.
You need latest git for having that feature.

Note: See TracTickets for help on using tickets.