[Ffmpeg-devel] [RFC]: vhook Documentation

Diego Biurrun diego
Mon Mar 5 09:48:06 CET 2007


On Sun, Mar 04, 2007 at 05:22:58PM -0800, Piero Bugoni wrote:
> 
> With regard to that, I have a question:
> 
> If a person is pointed to an external source for
> something, putting an explicit URL to that item is
> nice, but unfortunately seems doomed to failure
> eventually.

Yes, URLs are fickle beasts..

> Also, mentioning a single source may give the
> impression that that is the only source. Finally, I do
> not know if it is proper to give one party a "plug",
> or free advertising, while excluding others.

If one place is the offficial one, mentioning it is fine.

> For some usage examples, I explained them in a
> paragraph below the example. This may make the
> documentation lengthy, but I am not sure if it is
> correct to expect someone to understand an example
> merely by its command line syntax.

perfectly fine

> For users of Red Hat based systems, it may be
> worthwhile to remind them that this or that may
> require the corresponding "-devel" package. Omitting
> these is a simple mistake that anyone can make and
> mentioning it may save people hours of annoyance.

yes

> I mention these things here, since I would like to
> continue documentation, and will come across the same
> problems elsewhere.

Hopefully cleared up now.  If you have further questions, don't hesitate
to ask.

Review of your patch below.  Update the patch to take my review into
account and I'll apply the rest of it.

> --- hooks.texi-8222	2007-03-04 19:17:12.000000000 -0500
> +++ hooks.texi.new	2007-03-04 19:50:59.000000000 -0500

I prefer patches that I can apply with 'patch -p0' from the root of the
source tree.  The recommended way to create patches is to use Subversion
and create a patch with 'svn diff'.

> @@ -17,13 +17,18 @@
>  
> -Three modules are provided and are described below. They are all intended to
> +Six modules are provided and are described below. They are all intended to
>  be used as a base for your own modules.

I've removed the number from this sentence, it's bound to change often
in the future.

> +The modules are dynamic libraries: they have different suffixes (.so, .dll, .dylib)
> +depending on your platform. And your platform dictates if they are to be
> +somewhere in your PATH, or in your LD_LIBRARY_PATH. Or otherwise you will need to
> +specify the full path of the vhook file that you are using.

This hunk applied.

> @@ -46,6 +51,10 @@
>  
> +This module depends on the external library imlib2, available on 
> +Sourceforge, among other places, if it is not already installed on
> +your system.

dito

> @@ -96,6 +105,33 @@
>     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
> +
> +   # Date and time stamp, security-camera style:
> +   ffmpeg -r 29.97 -s 320x256 -f video4linux -i /dev/video0 -vhook 'vhook/imlib2.so -x 0 -y 0 -i black-260x20.png' \
> +     -vhook  'vhook/imlib2.so -c white -F /usr/X11R6/lib/X11/fonts/TTF/VeraBd.ttf/12 -x 0 -y 0 -t  %A-%D-%T' \
> +     output.avi
> +
> +     In this example the video is captured from the first video capture card as a 320x256 .avi, and a black 260 by 20 pixel

AVI

> +     PNG image is placed in the upper left corner, with the day, date and time overlaid on it in Vera Bold 12 point font. A simple
> +     black PNG file 260 pixels wide and 20 pixels tall was created in GIMP for this purpose.

You're using awfully long lines, please keep them below 80 characters
wherever it makes sense.  Same below.

> +     more slowly. Hint: blank lines in the file with only a newline are treated as end-of-file.

Capitalize after the colon.

> + 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

I would lowercase x and y here.

Diego




More information about the ffmpeg-devel mailing list