[Ffmpeg-devel] [RFC]: vhook Documentation
Víctor Paesa
wzrlpy
Sun Jan 21 16:38:43 CET 2007
Hi,
> Here's a review of your patch..
>
> On Tue, Jan 16, 2007 at 09:45:45PM -0800, C.Ren Boca wrote:
>>
>> --- hooks.texi 2007-01-17 00:30:30.000000000 -0500
>> +++ hooks.texi.new 2007-01-17 00:38:32.000000000 -0500
>> @@ -39,63 +39,57 @@
>>
>> -You may also overlay an image (even semi-transparent) like TV stations
>> do.
>> -You may move either the text or the image around your video to create
>> -scrolling credits, for example.
>> +Features:
>> +- True Type, Type1 and others via FreeType2 library
>
> TrueType
>
>> +- Font kerning (better output)
>> +- Line Wrap (if the text doesn't fit, the next char goes to the next
>> line)
>> +- Background box (currently in development)
>> +- Outline
>
> Trailing whitespace, please remove that from patches.
>
> Also, why not make this feature list a proper bulletted list with
> texinfo markup?
>
>> Text fonts are being looked for in a FONTPATH environment variable.
>>
>> Options:
>> @multitable @columnfractions .2 .8
>> - at item @option{-c <color>} @tab The color of the text
>> - at item @option{-F <fontname>} @tab The font face and size
>> - at item @option{-t <text>} @tab The text
>> - at item @option{-f <filename>} @tab The filename to read text from
>> - at item @option{-x <expresion>} @tab X coordinate of text or image
>> - at item @option{-y <expresion>} @tab Y coordinate of text or image
>> - at item @option{-i <filename>} @tab The filename to read a image from
>> - at end multitable
>> -
>> -Expresions are functions of these variables:
>> - at multitable @columnfractions .2 .8
>> - at item @var{N} @tab frame number (starting at zero)
>> - at item @var{H} @tab frame height
>> - at item @var{W} @tab frame width
>> - at item @var{h} @tab image height
>> - at item @var{w} @tab image width
>> - at item @var{X} @tab previous x coordinate of text or image
>> - at item @var{Y} @tab previous y coordinate of text or image
>> + at item @option{-c <color>} @tab Foreground color of the text
>> ('internet' way) <#RRGGBB> [default #ffffff]
>> + at item @option{-C <color>} @tab Background color of the text
>> ('internet' way) <#RRGGBB> [default #000000]
>> + at item @option{-f <font-filename>} @tab The font file to use
>> + at item @option{-o } @tab Outline glyphs using the
>> background color
>> + at item @option{-t <text>} @tab The text to display
>> + at item @option{-T <filename>} @tab The filename to read text from
>> + at item @option{-x <pos>} @tab X coordinate of the start of
>> text
>> + at item @option{-y <pos>} @tab Y coordinate of the start of
>> text
>> @end multitable
>>
>> -You may also use the constants @var{PI}, @var{E}, and the math
>> functions available at the
>> -FFmpeg formula evaluator at (@url{ffmpeg-doc.html#SEC13}), except
>> @var{bits2qp(bits)}
>> -and @var{qp2bits(qp)}.
>> -
>> -Usage examples:
>> -
>> +Usage Example:
>> @example
>> # Remember to set the path to your fonts
>> - FONTPATH="/cygdrive/c/WINDOWS/Fonts/"
>> - FONTPATH="$FONTPATH:/usr/share/imlib2/data/fonts/"
>> FONTPATH="$FONTPATH:/usr/X11R6/lib/X11/fonts/TTF/"
>> export FONTPATH
>>
>> - # Bulb dancing in a Lissajous pattern
>> - ffmpeg -i input.avi -vhook \
>> - 'vhook/imlib2.dll -x W*(0.5+0.25*sin(N/47*PI))-w/2 -y
>> H*(0.5+0.50*cos(N/97*PI))-h/2 -i /usr/share/imlib2/data/images/bulb.png'
>> \
>> - -acodec copy -sameq output.avi
>> -
>> - # Text scrolling
>> - ffmpeg -i input.avi -vhook \
>> - 'vhook/imlib2.dll -c red -F Vera.ttf/20 -x 150+0.5*N -y 70+0.25*N
>> -t Hello' \
>> - -acodec copy -sameq output.avi
>> + # When run from your build location:
>
> I would just assume an installed version of ffmpeg. Don't bother with
> these details.
>
>> + Will grab video from the first capture card and output it to a MPEG
>> video,
>
> an MPEG
>
>> + And place "Weekday-dd/mm/yy-hh:mm:ss" at the top left of the frame,
>> updated every second,
>> + using the Vera Bold TrueType Font, which should exist in:
>> /usr/X11R6/lib/X11/fonts/TTF/
>
> Ideally, keep lines below 80 characters.
>
>> + If ffmpeg is installed, it should be in your $PATH, make sure to
>> specify the full path
>> + of the vhook ".so" file that you are using.
>
> see above
>
>> + Check the manpage for strftime() for all the various ways you can
>> format the date and time.
>
> man page
>
>> +Command Line options:
>> +-m [0|1] Mode. Zero is the default Mode, see below.
>
> default mode
>
>> + If mask color is < 0x80 the abs difference is subtracted from the
>> frame. If
>
> absolute
>
>> + This way a mask that is visible both in light pictures and in dark can
>> be
>
> "light pictures and in dark ones" or IMO better "light and dark pictures".
>
> You've removed some parts of the documentation, I'll have to trust that
> it's correct since I haven't played around with vhook at all.
imlib2 docs appear as removed and then substituted by drawtext's ones.
I bet that is the result of diff'ing against a hooks.texi
that already had imlib's docs copied&pasted again.
P., please use "svn diff" or use diff against the original hooks.texi
Regards,
V?ctor
More information about the ffmpeg-devel
mailing list