[FFmpeg-user] Drawtext - complex expression to show feet+frames

Mark Burton mwjburton at gmail.com
Wed Apr 12 00:39:49 EEST 2017

> On 11 Apr 2017, at 21:51, Mark Burton <mwjburton at gmail.com> wrote:
>> On 11 Apr 2017, at 21:13, Moritz Barsnick <barsnick at gmx.net <mailto:barsnick at gmx.net>> wrote:

>> I haven't figured out how to format "12+6" as "12+06" though. Good luck
>> trying! :) (I know how to fake it, but there may be a proper way with
>> formatting expressions.)
> Yes, thats really the only thing left to do here - I was looking at how this could work and did wonder if the same principles that apply to printf could be applied, but having tried a few variations of ‘d', it seems not. Hmm.

Adding 02d as the third parameter seems to work for padding the frame number:

One issue I am having is that as the numbers count the vertical position of the text changes ever so slightly, looks like a judder. I’m guessing this is due to the character size variations so the position of the text is recalculated by tiny fractions. Is there a way to allow for this in the x and y position? I’ve tried with max_glyph_h, but I think it would need to know the height of all characters to come as it doesn’t make any difference.


More information about the ffmpeg-user mailing list