[gst-devel] kenburns plugin

Lane Brooks lane at brooks.nu
Thu Jan 13 00:48:45 CET 2011


On 01/12/2011 08:24 AM, Stefan Kost wrote:
> On 10.01.2011 22:51, Lane Brooks wrote:
>> I have written a kenburns plugin
>> (http://en.wikipedia.org/wiki/Ken_burns_effect) that does smooth
>> zooming/panning simultaneously.
>>
>> I have it committed in a git repo at https://github.com/dirjud/kenburns
>>
>> There are some gst-launch samples in the src/gstkenburns.c file.
>
> Such a plugin would be welcome. Make a patch against gst-plugins-bad and
> put it to bugzilla. Add yourself to the copyright comment.
>> Currently I have only implemented nearest neighbor sampling, so it is
>> fast but can show aliasing artifacts.
> Yes, n-tap filtering would be nice to have, but thats no show-stopper
> for getting it into bad.
>
> Do you know about GstController? I would prefer to only have "zoom",
> "xcenter", "ycenter" properties, make then controllable and leave the
> animations to GstController. With that you get envelops and LFOs right now.

I do know about controllers and opted not to use them because of the 
complication I thought it would put on the user for anything other than 
the linear case. For example, I implemented an internal controller that 
ramps up the velocity linearly until it reaches a paramaterized time. 
It then holds the velocity constant until it reaches the parameter 
mirror at the end where it ramps the velocity back down. This gives a 
nice looking effect. It requires taking some time derivatives 
(converting velocity to position) and what not. I wanted to have nice 
movement options that did not require the user to do a lot of math.

That said, not enabling external controllers does limit the 
functionality. For example, my current implementation only allows for 
one pan/zoom on a linear path. Using controllers, you could do curved 
paths or whatever. Let me play a little with the controllers to see if I 
can get similarly nice movement with them. Controllers would make it 
more generic, but I don't want to loose the ease of use.

Actually, I just had another thought. Currently I have a few different 
user selectable internal controllers like the velocity ramping one 
described above. Would it work to add another option that lets the user 
select to use an external controller instead? Then for the simple use 
case, you just set "zoom1", "xcenter1", "ycenter1", "zoom2", "xcenter2", 
"ycenter2", and "duration". For the more advanced usage, you instead put 
a controller on "zoom1", "xcenter1", and "ycenter1" and select to 
disable the internal controller.

Lane




More information about the gstreamer-devel mailing list