ZoomIn, ZoomOut, and KenBurns.
ZoomIn
Gradually scales up the clip from a smaller size.Constructor
Duration of the zoom effect in seconds, from the start of the clip.
Starting scale factor.
1.0 = 100% size (original). Minimum value is 0.1.Ending scale factor.
1.2 = 120% size (zoomed in 20%).Zoom anchor point. Determines which part of the frame stays fixed during zoom.String options:
"center"(default)"top-left","top-right","bottom-left","bottom-right""top","bottom","left","right"
(x, y) for custom anchor in clip coordinates.Examples
How It Works
- Modifies both
scaleandpositionproperties - Uses linear interpolation between
from_scaleandto_scale - Adjusts position to keep the anchor point fixed during zoom
- After duration, maintains
to_scalefor remainder of clip
src/movielite/vfx/zoom.py:5-71
ZoomOut
Gradually scales down the clip.Constructor
Duration of the zoom effect in seconds, measured from the end of the clip.
Starting scale factor.
1.2 = 120% size (zoomed in).Ending scale factor.
1.0 = 100% size (original). Minimum value is 0.1.Zoom anchor point. Same options as
ZoomIn.Examples
ZoomOut applies the effect at the end of the clip, while ZoomIn applies at the start.src/movielite/vfx/zoom.py:73-144
KenBurns
Cinematic slow zoom + pan effect named after the famous documentary filmmaker.Constructor
Duration of the effect in seconds. If
None, uses the entire clip duration.Starting zoom level.
1.0 = 100% size.Ending zoom level.
1.2 = 120% size.Starting position offset as
(x, y) in pixels.Ending position offset as
(x, y) in pixels.Examples
How It Works
- Combines zoom (scale) and pan (position) animations
- Uses cubic ease-in-out for smooth, cinematic motion
- If duration is
None, effect spans entire clip - Position offsets are relative to the clip’s base position
Easing Function
The Ken Burns effect uses cubic ease-in-out interpolation for smoother, more natural motion:src/movielite/vfx/zoom.py:146-220
Combining Zoom Effects
Zoom In Then Out
Ken Burns with Fade
Anchor Points Reference
Visual representation of anchor point positions:- center: Zoom from/to the center (most common)
- corners: Zoom from/to a specific corner
- edges: Zoom from/to the middle of an edge
- custom: Specify exact
(x, y)coordinates
Performance Considerations
Zoom effects modify clip scale and position properties, not pixel data. This makes them very efficient - no image processing is required.
The Ken Burns effect’s cubic easing calculation is extremely lightweight and adds negligible overhead.
Technical Details
Scale Adjustments
- Wraps the clip’s
_scalefunction with a time-based multiplier - Linear interpolation for
ZoomIn/ZoomOut - Cubic ease-in-out for
KenBurns
Position Adjustments
- Wraps the clip’s
_positionfunction - Calculates offsets to keep anchor point fixed
- Formula:
offset = anchor × (1 - current_scale)
See Also
- Rotation - Rotate clips for dynamic motion
- Fade Effects - Combine with fades for smooth transitions
- GraphicClip.set_scale() - Manually control scale
- GraphicClip.set_position() - Manually control position