Blur, BlurIn, and BlurOut.
Blur
Apply Gaussian blur to the clip. Can be static (constant blur) or animated (blur increases over time).Constructor
Blur intensity (kernel size). Higher values = more blur. Must be odd number ≥ 1.
The effect automatically converts to odd numbers and ensures minimum value of 1.
If
True, blur increases from 0 to intensity over the specified duration.
If False, applies constant blur at the specified intensity.Duration of the blur animation in seconds. Required when
animated=True.Examples
Static Blur
Animated Blur
How It Works
- Static blur: Applies OpenCV’s
GaussianBlurwith constant kernel size - Animated blur: Linearly interpolates kernel size from 1 to
intensityoverduration - Kernel sizes are always odd numbers (required by OpenCV)
- Kernel size of 1 means no blur is applied
src/movielite/vfx/blur.py:6-63
BlurIn
Blur-in effect that starts blurred and gradually becomes sharp.Constructor
Duration of the blur-in effect in seconds, from the start of the clip.
Maximum blur intensity at the start of the effect. The blur decreases to 0 by the end.
Example
How It Works
The blur intensity decreases over time:- t < duration: kernel_size = max_intensity × (1 - t/duration)
- t ≥ duration: No blur applied (sharp)
src/movielite/vfx/blur.py:65-105
BlurOut
Blur-out effect that starts sharp and gradually becomes blurred.Constructor
Duration of the blur-out effect in seconds, measured from the end of the clip.
Maximum blur intensity at the end of the effect.
Example
How It Works
The blur is applied at the end of the clip:- t < (clip_duration - duration): No blur applied (sharp)
- t ≥ (clip_duration - duration): kernel_size increases from 1 to max_intensity
src/movielite/vfx/blur.py:107-149
Combining Blur Effects
Blur In and Out
Blur with Fade
Performance Considerations
Blur effects use OpenCV’s optimized
GaussianBlur function, which is highly efficient even at high intensities. However, higher blur intensities will increase processing time.Intensity Guidelines
- Light blur: 3-7
- Medium blur: 9-15
- Heavy blur: 17-25
- Extreme blur: 27+
Very high blur intensities (>50) can significantly slow down rendering. For most use cases, intensities between 5-20 provide good visual results with reasonable performance.
Technical Details
- Uses OpenCV’s
cv2.GaussianBlurwith automatic sigma calculation - Kernel size must be odd and ≥ 1 (enforced automatically)
- For animated blur, kernel size is recalculated for each frame
- Standard deviation (sigma) is set to 0, letting OpenCV calculate it from kernel size
See Also
- Fade Effects - Combine with fades for smooth transitions
- Glitch Effects - Other distortion effects
- OpenCV GaussianBlur Documentation