[FFmpeg-user] filters zoompan and crop

S Andreason sandreas41 at gmail.com
Fri Nov 2 00:02:04 EET 2018

Jim DeLaHunt wrote:
> .
>> I want to generate an overlay to zoom in, have the input png start 
>> small, and grow to half the video size, like from 20 to 320 in width. 
>> Starting the zoompan at z=0.1 does not seem to work.
> Take a look at the *pad* filter 
> <http://ffmpeg.org/ffmpeg-all.html#pad>. That generates an output 
> frame which consists of an input frame with padding around it.
I suppose that could work, if it would accept the frame number as a 
variable, so that the x,y,w,h could change over time, and allow the 
padding color to be transparent.

So, I still see no filters to start small, without disturbing the rest 
of the frame, and have it grow over time to full size, replacing the 
video on the lower layer.
You have confirmed zoompan won't shrink less than 1.0 in size factor.
For example zoom value of 0.1 should enlarge the input stream x10 and 
with x and y I could select where in the stream[0] to place the 
(growing/shrinking) stream[1].

>> Also if the first filter was successful, I need to crop it so that it 
>> grows over time. I am having trouble getting crop to adjust based on 
>> the frame number. From my testing it seems n in this case starts at 0 
>> when the enable between starts, instead of the output video frame 
>> number like the other filters I have been using.
> I'm not sure I follow what you mean by "when the enable between starts".
Sorry, I'll re-word it;
when the "enable='between(t,#,#)'" begins
I was experiencing something more than just 0 to 2 frames offset. I'll 
work up another example once I have a moment to re-create it.


More information about the ffmpeg-user mailing list