On 04/09/2010 06:07 PM, S.N. Hemanth Meenakshisundaram wrote:
On 04/09/2010 04:18 PM, Stefano Sabatini wrote:
On date Friday 2010-04-09 08:02:50 -0700, S.N. Hemanth
Meenakshisundaram encoded:
On 04/08/2010 09:54 PM, S.N. Hemanth Meenakshisundaram wrote:
[...]
Index: vf_drawtext.c
===================================================================
--- vf_drawtext.c (revision 0)
+++ vf_drawtext.c (revision 0)
@@ -0,0 +1,589 @@
+/*
+ * vf_drawtext.c: print text over the screen
+
******************************************************************************
+ * Options:
+ * -f<filename> font filename (MANDATORY!!!)
+ * -s<pixel_size> font size in pixels [default 16]
+ * -b print background
+ * -o outline glyphs (use the bg color)
+ * -x<pos> x position (>= 0) [default 0]
+ * -y<pos> y position (>= 0) [default 0]
+ * -t<text> text to print (will be passed to strftime())
+ * MANDATORY: will be used even when -T is used.
+ * in this case, -t will be used if some error
+ * occurs
+ * -T<filename> file with the text (re-read every frame)
+ * -c<#RRGGBB> foreground color ('internet' way) [default
#ffffff]
+ * -C<#RRGGBB> background color ('internet' way) [default
#000000]
+ *
+
******************************************************************************
+ * Features:
+ * - True Type, Type1 and others via FreeType2 library
+ * - Font kerning (better output)
+ * - Line Wrap (if the text doesn't fit, the next char go to the
next line)
+ * - Background box
+ * - Outline
+
******************************************************************************
User-documentation for filters should be put in doc/libavfilter.texi,
also I don't like this syntax, possibly we should try hard at giving a
consistent interface to the user, so we should either use
PARAM-1:PARAM-2:...:PARAM-N either use libavutil/parseutils.c (which
still depends on opt.c so I don't believe Michail won't accept this to
be included in the main repo, but that's not a problem for now).
Am sorry for the confusion here. The syntax above is from the old
vhook drawtext file, the current syntax coded is :
ffplay -vfilters
drawtext=f:<font_name>:t:<text>:T:<file_name>:s:<font_size>:x:<x_position>:y:<y_position>:c:<font_color>:C:<bg_color>:b:o
video.avi
where all but font name and text are optional and order is not important.
Is the syntax above acceptable? I will add all this to the texi file
if this is fine and start using parseutils.
[...]
I'll make changes based on the other comments and post the updated
vf_drawtext.
Thanks
Some good news. I tested the filter and it works :) I will make the
changes in coding style, argument parsing etc and then finish yadif.
ffplay -vfilters drawtext=f:FreeSerif.ttf:t:TestText invideo.mp4
Right now the font file needs to be in the ffmpeg folder. Will add
FONTPATH to filename to fix this.
_______________________________________________
FFmpeg-soc mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc