[FFmpeg-devel] [PATCH] lavfi/drawtext: add support for printing frame numbers

Stefano Sabatini stefasab at gmail.com
Thu Nov 22 13:25:55 CET 2012


On date Thursday 2012-11-22 12:53:03 +0100, Nicolas George encoded:
> Le duodi 2 frimaire, an CCXXI, Stefano Sabatini a écrit :
> > I like to keep it consistent with the "n" variable in the expression,
> > an alias like "frame_nb" or "frame_num" or "frameno" would be ok I think.
> > 
> > Note: printing frame number is useful for several debugging reasons
> > (e.g. when transcoding).
> 
> Ok.
> 
> > Well, at least we could deliver some control over the formatting,
> > through a custom format or additional params.
> 
> Definitely at some point, but that can be added later, with shared code for
> frame_num and pts.
> 
> >  } functions[] = {
> > +    { "frame_num", 0, 0, 0,   func_frame_num },
> >      { "pts",       0, 0, 0,   func_pts      },
> >      { "gmtime",    0, 1, 'G', func_strftime },
> >      { "localtime", 0, 1, 'L', func_strftime },
> > +    { "n",         0, 0, 0,   func_frame_num },
> 
> Grouping the aliases seems a better idea. The list was not sorted
> alphabetically anyway. It could be considered sorted by the function name if
> you move the "n" line.
> 
> Apart from that, LGTM.

Applied.
-- 
FFmpeg = Furious and Freak Mastodontic Proud Erroneous God


More information about the ffmpeg-devel mailing list