View the complete source code: effects_showcase.py
Fade Effects
Fade effects create smooth transitions at the beginning or end of clips.Fade In and Fade Out
FadeIn(duration)- Fades from black to full opacityFadeOut(duration)- Fades from full opacity to black- Duration is in seconds
Blur Effects
Blur effects can create focus effects, transitions, or dreamy aesthetics.Static Blur
Apply constant blur throughout the clip:Blur In
Start blurred, gradually become clear:Blur Out
Start clear, gradually become blurred:Color Effects
Adjust colors, saturation, brightness, and contrast to achieve your desired look.Saturation
Increase or decrease color saturation:Brightness
Make the video brighter or darker:Contrast
Increase or decrease contrast:Black and White
Convert to grayscale:Sepia Tone
Apply vintage sepia effect:Zoom Effects
Create dynamic camera movements with zoom effects.Zoom In
Gradually zoom into the frame:Zoom Out
Gradually zoom out of the frame:Ken Burns Effect
Combine zoom and pan for the classic Ken Burns effect:The Ken Burns effect is commonly used in documentaries to add motion to static photos.
Glitch Effects
Create digital distortion and glitch aesthetics.Digital Glitch
Simulate digital corruption with RGB shift, horizontal lines, and scan lines:Chromatic Aberration
Create RGB color separation effect:Pixelate
Create blocky, pixelated look:Vignette Effect
Darken the edges of the frame to draw focus to the center:intensity- How dark the edges become (0.0 to 1.0)radius- How far the vignette extends (0.0 to 1.0)
Combining Multiple Effects
Effects are applied in the order they are added:Effects are rendered in the order they’re added. The order can significantly affect the final result.
Audio Effects
Apply effects to audio tracks using theafx module.
Audio Fade Effects
Audio effects work the same way as visual effects - use
add_effect() to chain them.Effect Parameters Reference
Fade Effects
| Effect | Parameters | Description |
|---|---|---|
FadeIn(duration) | duration: float (seconds) | Fade from black to full opacity |
FadeOut(duration) | duration: float (seconds) | Fade from full opacity to black |
Blur Effects
| Effect | Parameters | Description |
|---|---|---|
Blur(intensity) | intensity: float (0-100) | Static blur effect |
BlurIn(duration, max_intensity) | duration: floatmax_intensity: float | Start blurred, become clear |
BlurOut(duration, max_intensity) | duration: floatmax_intensity: float | Start clear, become blurred |
Color Effects
| Effect | Parameters | Description |
|---|---|---|
Saturation(factor) | factor: float (0.0 = grayscale, 1.0 = normal, >1.0 = vibrant) | Adjust color saturation |
Brightness(factor) | factor: float (1.0 = normal) | Adjust brightness |
Contrast(factor) | factor: float (1.0 = normal) | Adjust contrast |
BlackAndWhite() | None | Convert to grayscale |
Sepia(intensity) | intensity: float (0.0 to 1.0) | Apply sepia tone |
Zoom Effects
| Effect | Parameters | Description |
|---|---|---|
ZoomIn(duration, from_scale, to_scale) | duration: floatfrom_scale: floatto_scale: float | Zoom into frame |
ZoomOut(duration, from_scale, to_scale) | duration: floatfrom_scale: floatto_scale: float | Zoom out of frame |
KenBurns(start_scale, end_scale, start_position, end_position) | See API docs | Zoom + pan effect |
Glitch Effects
| Effect | Parameters | Description |
|---|---|---|
Glitch(intensity, rgb_shift, horizontal_lines, scan_lines) | intensity: float (0.0-1.0)Booleans for effect types | Digital glitch effect |
ChromaticAberration(intensity) | intensity: float | RGB color separation |
Pixelate(block_size) | block_size: int | Pixelation effect |
Other Effects
| Effect | Parameters | Description |
|---|---|---|
Vignette(intensity, radius) | intensity: float (0.0-1.0)radius: float (0.0-1.0) | Darken frame edges |
Performance Tips
For better performance when applying multiple effects:
- Effects are processed in sequence during rendering
- Computationally intensive effects (blur, glitch) will slow rendering
- Consider reducing video resolution for preview renders
- Use
VideoQualityenum to balance quality and speed
Next Steps
Text Animations
Learn how to add animated text overlays
Audio Mixing
Master audio track control and mixing
API Reference
Detailed API documentation for all effects
Custom Effects
Create your own custom effects