[FFmpeg-user] How add expression in drawtext's text

Gyan Doshi gyandoshi at gmail.com
Mon Jun 4 08:21:46 EEST 2018



On 04-06-2018 09:24 AM, qw wrote:

> But the width of the text box will increase as frame number increases. I want to make the width of the text box unchanged. If the largest frame number is 99999, I want to make the width of the text is of 5 numbers. How to do it?

You have to know the final frame count beforehand. Once you do, use the 
text expression:

     text='%{eif\:n\:d\:4}'

where 4 is the width of the text with padding.


Regards,
Gyan


More information about the ffmpeg-user mailing list