--- ../../../ffmpeg_soc/libavfilter/ffmpeg/doc/libavfilter.texi 2010-04-04 02:11:17.144045518 -0700 +++ libavfilter.texi 2010-04-22 15:07:08.367807862 -0700 @@ -116,12 +116,12 @@ ./ffmpeg -i in.avi -vfilters "crop=0:0:0:240" out.avi @end example -``x'' and ``y'' specify the position of the top-left corner of the +$var{x} and $var{y} specify the position of the top-left corner of the output (non-cropped) area. -The default value of ``x'' and ``y'' is 0. +The default value of $var{x} and $var{y} is 0. -The ``width'' and ``height'' parameters specify the width and height +The $var{width} and $var{height} parameters specify the width and height of the output (non-cropped) area. A value of 0 is interpreted as the maximum possible size contained in @@ -137,7 +137,7 @@ 100:100 and the right-bottom corner corresponding to the right-bottom corner of the input image. -The default value of ``width'' and ``height'' is 0. +The default value of $var{width} and $var{height} is 0. @section drawbox @@ -147,6 +147,95 @@ Draw a box with x:y:width:height dimensions in a chosen color. +@section drawtext + +Draws text string or text from specified file on top of video. + +It accepts the following parameters: +font=:text=:file=:x=:y=: +fgcolor=:bgcolor=:size=:box=: +outline= + +font and at least one of text and file are mandatory parameters. + +If a date/time format string is passed in place of text, the current +date and time are drawn in the specified format. + +The description of the accepted parameters follows. + +@table @option +@item font + +Specifies the font file to be used for drawing text. Path must be included. +This parameter is mandatory. + +@item text + +Specifies the text string to be drawn. +This parameter is mandatory if no file is specified and also serves as the +fallback text if any file specified fails to open. + +@item file + +Specifies a text file containing text to be drawn. Max of 1024 characters are +read from the file. Any text string provided is ignored if file text is valid. + +This parameter is mandatory if no text string is specified. + +@item x, y + +Specify the offsets where text will be drawn within the video +frame. Relative to the top/left border of the output image. + +The default value of $var{x} and $var{y} is 0. + +@item size + +Specifies the font size to be used for drawing text. + +The default value of $var{size} is 16. + +@item fgcolor + +Specifies the foreground color to be used for drawing text. +Specify either as a string (e.g. black or as a hex value e.g. FF0000) + +The default value of $var{fgcolor} is black. + +@item bgcolor + +Specifies the background color to be used for drawing box around text +or drawing text outline based on option selected. +Specify either as a string (e.g. black or as a 0xRRGGBB e.g. 0xFF0000) + +The default value of $var{bgcolor} is white. + +@item box + +Specifies whether to draw a box around text using background color. +Value should be either 1(enable) or 0(disable). + +The default value of $var{box} is 0. + +@item outline + +Specifies whether to draw an outline around text using background color. +Value should be either 1(enable) or 0(disable). + +The default value of $var{outline} is 0. + +@end table +@example +drawtext="font=FreeSerif.ttf: text=TestText: x=100: y=50: size=24: + fgcolor=Yellow: bgcolor=Red: b=1" +@end example + +Draw 'TestText' with font FreeSerif of size 24 at (100,50), text color is yellow, +background color is red, draw a box around text. + +Note that the double quotes are not necessary if spaces are not used in specifying +the parameter list. + @section fifo @example @@ -278,24 +367,24 @@ @item width, height Specify the size of the output image with the paddings added. If the -value for ``width'' or ``height'' is 0, the corresponding input size +value for $var{width} or $var{height} is 0, the corresponding input size is used for the output. -The default value of ``width'' and ``height'' is 0. +The default value of $var{width} and $var{height} is 0. @item x, y Specify the offsets where to place the input image in the padded area with respect to the top/left border of the output image. -The default value of ``x'' and ``y'' is 0. +The default value of $var{x} and $var{y} is 0. @item color Specify the color of the padded area, it can be the name of a color (case insensitive match) or a 0xRRGGBB[AA] sequence. -The default value of ``color'' is ``black''. +The default value of $var{color} is ``black''. @end table @@ -323,14 +412,14 @@ the next filter, the scale filter will convert the input to the requested format. -If the value for ``width'' or ``height'' is 0, the respective input +If the value for $var{width} or $var{height} is 0, the respective input size is used for the output. -If the value for ``width'' or ``height'' is -1, the scale filter will +If the value for $var{width} or $var{height} is -1, the scale filter will use, for the respective output size, a value that maintains the aspect ratio of the input image. -The default value of ``width'' and ``height'' is 0. +The default value of $var{width} and $var{height} is 0. @section setpts @@ -422,10 +511,10 @@ template and to be employed in analysis / debugging tools. It accepts as optional parameter a string of the form -``width:height'', where ``width'' and ``height'' specify the size of +``width:height'', where $var{width} and $var{height} specify the size of the configured source. -The default values of ``width'' and ``height'' are respectively 352 +The default values of $var{width} and $var{height} are respectively 352 and 288 (corresponding to the CIF size format). @chapter Available video sinks