[FFmpeg-devel] [PATCH] Add drawtext filter from the libavfilter soc repo.
Fri Feb 18 11:59:25 CET 2011
On date Tuesday 2010-10-05 02:09:16 -0700, Baptiste Coudurier encoded:
> On 10/5/10 2:03 AM, Stefano Sabatini wrote:
> > On date Tuesday 2010-09-28 16:17:00 +0200, Stefano Sabatini encoded:
> >> ---
> >> configure | 6 +
> >> doc/filters.texi | 81 ++++++++
> >> libavfilter/Makefile | 1 +
> >> libavfilter/allfilters.c | 1 +
> >> libavfilter/vf_drawtext.c | 494 +++++++++++++++++++++++++++++++++++++++++++++
> >> 5 files changed, 583 insertions(+), 0 deletions(-)
> >> create mode 100644 libavfilter/vf_drawtext.c
> > Ping.
> MONOCHROME is very low quality, and this filter could use draw_slice IMHO.
Update work in progress, gray-tone glyph rendering support added, also
added a mapping for the libfreetype flags (which is maybe overkill),
comments are welcome.
Per-slice drawing is a bit tricky so I'd rather avoid it for the first
I'll add UTF-8 support in a further patch (BTW, do we have UTF-8
handling utilities in libav*?).
Also I plan to add support for frame-information printing overlay (for
example for printing number of frame and PTS, frame-type), but I'm not
sure how to implement such interface.
I was thinking about something of the kind:
drawtext=fontfile=FreeSerif.ttf: mode=frameinfo: text='pts:%p time:%t frame_number:%n': fgcolor=white: fontsize=50
where 'mode' specifies the "template mode" to adopt when "interpreting"
the passed text, in our case it may be either 'strprintf'
Alternatively we could have different variant of the same filter,
e.g. drawtext and drawframeinfo, both sharing most of the code.
FFmpeg = Freak & Fast Mournful Programmable Ecumenical God
More information about the ffmpeg-devel