@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 'libavfilter', 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.
@end example
where 20 is the point size.
-You can specify the filename to read RGB color names from. If none are
+You can specify the filename to read RGB color names from. If it is not
specified, these defaults are used: @file{/usr/share/X11/rgb.txt} and
@file{/usr/lib/X11/rgb.txt}
@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
+@item @option{-R <expression>}@tab Value for R color
+@item @option{-G <expression>}@tab Value for G color
+@item @option{-B <expression>}@tab Value for B color
+@item @option{-A <expression>}@tab Value for Alpha channel
@end multitable
Expressions are functions of these variables:
'vhook/imlib2.so -C rgb.txt -c CustomColor1 -F VeraBd.ttf/16 -x 100 -y -1.0*N -f credits.txt' \
-sameq output.avi
- 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.
+ 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 \