[Ffmpeg-devel] [PATCH] Add moving images feature to imlib2vhook

Michael Niedermayer michaelni
Mon Nov 6 20:49:00 CET 2006


Hi

On Mon, Nov 06, 2006 at 07:41:28PM +0100, V?ctor Paesa wrote:
> Hi,
> >> Hi,
> >>
> >> On 11/3/06, V?ctor Paesa <wzrlpy at arsystel.com> wrote:
> >>> > Hi
> >>> >
> >>> > On Thu, Nov 02, 2006 at 11:11:33PM +0100, V?ctor Paesa wrote:
> >>> >
> >>> > 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 ?
> >>
> >> Should be done now, thanks to Michael.
> >
> > Great, thanks.
> >
> 
> Here is the revised patch:
> 
> You may test it with a bulb flying in a Lissajous pattern:
> 
> ffmpeg -i input.avi -vhook \
> 'vhook/imlib2.dll
> -x W*(0.5+0.25*sin(N/47*PI))-w/2
> -y H*(0.5+0.50*cos(N/97*PI))-h/2
> -i /usr/share/imlib2/data/images/bulb.png'
> -acodec copy -sameq output.avi

patch looks ok (minus the trailig whitespace and a small cosmetic here 
and there)

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is




More information about the ffmpeg-devel mailing list