[Ffmpeg-devel] [RFC]: vhook Documentation

Víctor Paesa wzrlpy
Mon Feb 26 20:17:21 CET 2007


>> Maybe more clear could be to say that the imlib2
>> vhook
>> depends on the (equally named) imlib2 external
>> library.
> I'll make sure it includes that.
> Regarding vhook, imlib2, and the other vhook objects:
> What got me here in the first place was trying to put
> a running timestamp in a live feed. (Security-camera
> style). Drawtext worked, but the text is not visible
> if the background color is the same. I tried to use
> watermark put a back background behind the text, but
> it seems imlib2 is better suited for this.

There was a patch to fix the background bug in drawtext, it
was not accepted, but you may still find it searching the
ffmpeg-devel mail archives.

> The imlib2 documentation mentions 'vhook/imlib2.dll',
> not
> imlib2.so, but other than that the examples work.

The vhooks are dynamic libraries: they may have suffixes .so, .dll, dylib.
I couldn't resist to introduce some platform diversity, and I used .dll
in the example.

> I think possibly a timestamp example should be given,
> as well as rolling credits, (like from a file or
> pipe), and possibly a rapidly updating status display.
> (For instance, pan/tilt/zoom numbers from a remote
> control camera).

The -f option in imlib2 vhook allows reading from a file (maybe a fifo?),
it may be used readily for these purpouses.

> Any other info toward the application of the vhook
> modules might also be good to list. If you have any
> examples to try that would be good. Likewise if any
> one else does that would be good as well.

Well, I use imlib2 to scroll a transparent PNG that contains the credits
of my home videos. That PNG was generated taking a screen snapshot
of a nicely formated credit list prepared with a word processor (an
extremly non-geek way of doing it!).

A trick: in imlib2 the -x, -y coordinates are
functions: you might define a function that positions your overlaid image
outside of the video, and then only appears visible during a certain frame
interval. Or you may model some simple physics: parabolic paths, a ball
bouncing, leaves in a swirl, just revisit your math school books :-)


More information about the ffmpeg-devel mailing list