GraphicEffect base class and can be added to clips using the add_effect() method.
Available Effects
Fade Effects
Smooth fade-in and fade-out transitions by animating opacity
Blur Effects
Gaussian blur effects including static, animated, blur-in, and blur-out
Color Effects
Color adjustments: saturation, brightness, contrast, grayscale, and sepia
Zoom Effects
Zoom-in, zoom-out, and cinematic Ken Burns effects
Glitch Effects
Digital distortion: glitch, chromatic aberration, and pixelate
Rotation
Static and animated rotation with customizable options
Vignette
Darken edges to create a vignette effect
Basic Usage
All visual effects are applied using theadd_effect() method:
Combining Effects
Multiple effects can be chained together and will be applied in the order they are added:Effect Categories
Opacity Effects
- FadeIn: Gradually increase opacity from 0 to full
- FadeOut: Gradually decrease opacity to 0
Blur Effects
- Blur: Apply static or animated Gaussian blur
- BlurIn: Start blurred and become sharp
- BlurOut: Start sharp and become blurred
Color Adjustments
- Saturation: Adjust color saturation (0.0 = grayscale, >1.0 = more saturated)
- Brightness: Adjust brightness/exposure
- Contrast: Adjust contrast
- BlackAndWhite / Grayscale: Convert to grayscale
- Sepia: Apply vintage sepia tone
Motion & Transform
- ZoomIn: Gradually scale up the clip
- ZoomOut: Gradually scale down the clip
- KenBurns: Cinematic slow zoom + pan effect
- Rotation: Rotate by a specific angle (static or animated)
Distortion & Stylization
- Glitch: Digital glitch artifacts with RGB shift
- ChromaticAberration: Lens distortion effect
- Pixelate: Blocky pixelation effect
- Vignette: Darken frame edges
Performance Considerations
Some effects use Numba JIT compilation for optimized performance (e.g.,
Brightness, Contrast). The first frame may take slightly longer to process while the JIT compiler optimizes the code.Effects like
Blur and Rotation use OpenCV’s optimized functions for fast processing, even at high resolutions.