The Clip object wraps an Asset and controls how it appears on screen. Think of the Asset as your raw content (the video file, image, or text), and the Clip as all the presentation decisions - where it appears, how big it is, what color effects it has, how it fades in and out. This guide documents all available Clip parameters and their interactions.
Editor Architecture
Asset → Clip → Track → Timeline
Asset: Raw content (what to show) Clip: Presentation control (how to show it) Track: Layering container (for stacking multiple clips) Timeline: Final composition (the output video) This separation lets you reuse the same asset in multiple clips with different visual treatments - same video, but one clip shows it full-screen while another shows it as a small picture-in-picture overlay.
Clip Parameters
Core Parameters
Geometry Parameters
Visual Effect Parameters
Scale Parameter
The scale parameter is a size multiplier applied after fit mode. First, the fit mode handles the aspect ratio and scales your content to match the timeline, then scale multiplies that result. This is useful for creating picture-in-picture effects (scale=0.3 for a tiny corner video) or zoom effects (scale=1.5 to enlarge).
clip = Clip(
asset=VideoAsset(id=video.id),
duration=10,
scale=0.5, # 50% of original size
position=Position.top_left
)
Range: 0.0 to 10.0 (default: 1.0)
Example with scale = 0.5 and Position.top_left
Opacity Parameter
The opacity parameter controls transparency, letting you create semi-transparent overlays, subtle watermarks, or fade effects. At 1.0 your clip is fully solid, at 0.5 it’s half-transparent, and at 0.0 it’s completely invisible.
clip = Clip(
asset=VideoAsset(id=video.id),
duration=10,
opacity=0.5 # 50% transparent
)
Range: 0.0 (invisible) to 1.0 (opaque)
Example with opacity = 0.3
Filter Parameter
The filter parameter applies color and visual treatments to your clip. These are global effects that change the entire clip’s appearance - you can make it black and white, blur it for backgrounds, adjust contrast, or create stylistic looks. Each clip can have one filter applied.
Filter.greyscale # Remove color (black and white)
Filter.blur # Blur the video
Filter.contrast # Increase contrast
Filter.boost # Boost contrast and saturation
Filter.muted # Reduce saturation and contrast
Filter.darken # Darken the scene
Filter.lighten # Lighten the scene
Filter.negative # Invert colors
from videodb.editor import Filter
clip = Clip(
asset=VideoAsset(id=video.id),
duration=10,
filter=Filter.greyscale
)
Example with Filter.greyscale
Transition Parameter
The transition parameter controls fade in/out effects, making your clips appear and disappear smoothly instead of cutting abruptly. The fade happens over the first and last N seconds of your clip - so a 2-second fade means the first 2 seconds gradually appear, and the last 2 seconds gradually disappear.
clip = Clip(
asset=VideoAsset(id=video.id),
duration=10,
transition=Transition(
in_="fade", # Fade in effect (note the underscore)
out="fade", # Fade out effect
duration=2 # Transition duration in seconds
)
)
Example:
Parameters:
in_: Transition type for entry (use in_ with underscore because in is a Python keyword) out: Transition type for exit duration: Length of transition in seconds
Complete Example
Here’s a clip using multiple parameters:
clip = Clip(
asset=VideoAsset(id=video.id),
duration=10,
position=Position.bottom_left,
scale=0.7,
opacity=0.3,
filter=Filter.greyscale,
transition=Transition(in_="fade", out="fade", duration=3),
fit=None
)
Parameter Reference
Next Step:
For hands-on experimentation with all Clip parameters, see: