Skip to content

Advanced Clip Control: The Composition Layer

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

Parameter
Type
Description
asset
Asset
The content to display (VideoAsset, ImageAsset, AudioAsset, TextAsset, CaptionAsset)
duration
float
Clip length in seconds

Geometry Parameters

Parameter
Type
Description
fit
Fit
Scaling behavior: Fit.crop, Fit.contain, Fit.cover, Fit.none
position
Position
Anchor point (9 zones: top_left, center, bottom_right, etc.)
offset
Offset
Fine-tune position with x/y coordinates
scale
float
Size multiplier (0.0 to 10.0, default: 1.0)

Visual Effect Parameters

Parameter
Type
Description
filter
Filter
Color treatment (greyscale, blur, contrast, etc.)
opacity
float
Transparency (0.0 = invisible, 1.0 = opaque)
transition
Transition
Fade in_/out effects

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
This embedded link can't be shown.

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
This embedded link can't be shown.

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
This embedded link can't be shown.

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:
This embedded link can't be shown.
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

Parameter
Type
Default
Description
asset
Asset
Required
Content to display
duration
float
Required
Clip length in seconds
fit
Fit
Fit.crop
Scaling mode
position
Position
None
Anchor point (9 zones)
offset
Offset
None
Fine position adjustment
scale
float
1.0
Size multiplier (0.0-10.0)
opacity
float
1.0
Transparency (0.0-1.0)
filter
Filter
None
Color treatment
transition
Transition
None
Fade effects

Next Step:

For hands-on experimentation with all Clip parameters, see:

 
Want to print your doc?
This is not the way.
Try clicking the ··· in the right corner or using a keyboard shortcut (
CtrlP
) instead.