[Ffmpeg-devel] [PATCH] Add moving images feature to imlib2 vhook
Fri Nov 3 19:52:18 CET 2006
> On Thu, Nov 02, 2006 at 11:11:33PM +0100, V?ctor Paesa wrote:
>> > I have added the posibility of moving text or images to vhook imlib2
>> > needed a scrolling credits generator for my home video of my son's
>> > Sommerfest at school).
>> > I would like to submit for your review the attached patch.
>> The original patch no longer applies, here is another version.
>> Index: ffmpeg/vhook/imlib2.c
>> ==================================================================> ---
>> ffmpeg/vhook/imlib2.c (revision 6777)
>> +++ ffmpeg/vhook/imlib2.c (working copy)
>> @@ -7,19 +7,40 @@
>> * is passed through strftime so that it is easy to imprint the date
>> * time onto the image.
>> + * 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
>> + * scrolling credits, for example.
>> + *
>> + * Text fonts are being looked for in FONTPATH
>> + *
>> * Options:
>> * -c <color> The color of the text
>> * -F <fontname> The font face and size
>> * -t <text> The text
>> * -f <filename> The filename to read text from
>> - * -x <num> X coordinate to start text
>> - * -y <num> Y coordinate to start text
>> + * -x <float> Initial X coordinate to start text or image
>> + * -y <float> Initial Y coordinate to start text or image
>> + * -X <float> Delta X movement in pixels per frame
>> + * -Y <float> Delta Y movement in pixels per frame
>> + * -i <filename> The filename to read a image from
> may i suggest that you use libavcodec/eval.c for calculating the position
> based on the frame number, that way a simple -x 100+5.3*n will work and
> less sane things like -x 100+100*sin(n/100) will work too
Brilliant idea, it makes possible to do nice "natural" movements,
rising sun, flying birds, parabolics, ... :-)
I'll try it, so far I've seen an example of using eval at the rate control
code, but would it be possible that some knowlegeable person add some
Doxigen comments to eval.h ?
>> @@ -307,4 +400,3 @@
>> picture->data, picture->linesize);
More information about the ffmpeg-devel