user5462: I've been able to get most of the manipulations I want on various PTS/timestamp things.. except this one.  I have a case where we have a running PTS that gets stamped via drawtext.  I currently use the %{pts:flt} which outputs millisecond accurate seconds.  This is great, but I ultimately need to format this in the format SS.ff, by which I mean we always keep only the last two digits of the seconds, and we ONLY print two significant digits of the fractional (micro/milli) second portion.
I've been through a truckload of various gmtime/strftime() attempts, and I'm stymied in part because it appears that only flt provides the fractional seconds part that I want, and it doesn't look like strftime() has support for width/padding/truncating?

user31818: The FFMPEG does not support strtime %f option; therefore, the fractional second works with AVTB only. The parameter is
-filter_complex "drawtext=fontsize=90:x=20:y=20:text='pts=%{pts\:gmtime\:0\:%S %f} AVTB=%{eif\:trunc(t)\:d\:2}.%{eif\:(1M*t-1M*trunc(t))/10000\:d\:2}':box=1"

and the result is


5462: <p>I've been able to get most of the manipulations I want on various PTS/timestamp things.. except this one.  I have a case where we have a running PTS that gets stamped via drawtext.  I currently use the <code>%{pts:flt}</code> which outputs millisecond accurate seconds.  This is great, but I ultimately need to format this in the format <code>SS.ff</code>, by which I mean we always keep <em>only</em> the last two digits of the seconds, and we ONLY print two significant digits of the fractional (micro/milli) second portion.</p>
<p>I've been through a truckload of various gmtime/strftime() attempts, and I'm stymied in part because it appears that only <code>flt</code> provides the fractional seconds part that I want, and it doesn't look like strftime() has support for width/padding/truncating?</p>
 31818: <p>The FFMPEG does not support <em>strtime %f</em> option; therefore, the fractional second works with AVTB only. The parameter is</p>
<pre><code>-filter_complex &quot;drawtext=fontsize=90:x=20:y=20:text='pts=%{pts\:gmtime\:0\:%S %f} AVTB=%{eif\:trunc(t)\:d\:2}.%{eif\:(1M*t-1M*trunc(t))/10000\:d\:2}':box=1&quot;
</code></pre>
<p>and the result is</p>
<p><a href="https://i.stack.imgur.com/iMMti.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iMMti.png" alt="enter image description here" /></a></p>
