]> git.sesse.net Git - ffmpeg/blobdiff - doc/hooks.texi
Remove reimplementation of av_log2
[ffmpeg] / doc / hooks.texi
index d4c4c5becb41b0814e16378267639748bd03c108..73dc021b9826c3a85786ff3d810d43990182fb3a 100644 (file)
 
 @chapter Introduction
 
+@var{Please be aware that vhook is deprecated, and hence its development is
+frozen (bug fixes are still accepted).
+The substitute will be the result of our 'Video Filter API' Google Summer of Code
+project. You may monitor its progress by subscribing to the ffmpeg-soc mailing
+list at @url{http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc}.}
 
 The video hook functionality is designed (mostly) for live video. It allows
 the video to be modified or examined between the decoder and the encoder.
@@ -78,12 +83,12 @@ Options:
 @item @option{-F <fontname>}  @tab The font face and size
 @item @option{-t <text>}      @tab The text
 @item @option{-f <filename>}  @tab The filename to read text from
-@item @option{-x <expresion>} @tab x coordinate of text or image
-@item @option{-y <expresion>} @tab y coordinate of text or image
+@item @option{-x <expression>}@tab x coordinate of text or image
+@item @option{-y <expression>}@tab y coordinate of text or image
 @item @option{-i <filename>}  @tab The filename to read a image from
 @end multitable
 
-Expresions are functions of these variables:
+Expressions are functions of these variables:
 @multitable @columnfractions .2 .8
 @item @var{N} @tab frame number (starting at zero)
 @item @var{H} @tab frame height
@@ -150,6 +155,22 @@ Usage examples:
    This example does the same as the one above, but specifies an rgb.txt file
    to be used, which has a custom made color in it.
 
+   # Variable colors
+   ffmpeg -i input.avi -vhook \
+     'vhook/imlib2.so -t Hello -R abs(255*sin(N/47*PI)) -G abs(255*sin(N/47*PI)) -B abs(255*sin(N/47*PI))' \
+     -sameq output.avi
+
+     In this example, the color for the text goes up and down from black to
+     white.
+
+   # Text fade-out
+   ffmpeg -i input.avi -vhook \
+     'vhook/imlib2.so -t Hello -A max(0,255-exp(N/47))' \
+     -sameq output.avi
+
+     In this example, the text fades out in about 10 seconds for a 25 fps input
+     video file.
+
    # scrolling credits from a graphics file
    ffmpeg -sameq -i input.avi \
      -vhook 'vhook/imlib2.so -x 0 -y -1.0*N -i credits.png' output.avi