[FFmpeg-devel] [PATCH] allow vf_drawtext to draw framenumbers
Jean First
jeanfirst at gmail.com
Mon Apr 11 21:44:24 CEST 2011
On Sat Apr 09 2011 02:31:49 GMT+0200 (CET), Stefano Sabatini wrote:
> * implement a special mode, in this mode you interpret %X codes in a
> special way, in a similar way to that of strftime(). The problem is
> that it would be incompatible with strftime()-sequences.
>
> * implement a dynamic environment accessible through the text
> specification, for example:
> "month:${month} n:${frame_number:%04d}"
> Overkill?
>
> The problem with the #f/#F system is that it is quite limited and not
> very extensible (for example what if you want to print 5 padded digits
> for the frame number)?
I prefer the second idea. But I think on the shell ${month} will also be
replaced with environment variables.
But what do you think about splitting the text and its variables
completely ?
f.ex: text="Date: %s,%cFrame: %05d%cPTS: %s",textvars="%Y %n
frame_number %n pts"
I'm not sure if it is easy to implement, but at least if textvars are
not present you do not have to parse the text with snprintf or any other
function.
More information about the ffmpeg-devel
mailing list