Video
Crop
Video Cropping Transformations
Crop Modes
Control how your video is cropped using the c_{mode}
parameter. Each mode handles dimensions differently:
crop
- Exact Dimensions
Crops the video to exactly match the specified dimensions, removing excess pixels.
- Best for: Fixed-size video players where exact dimensions are required
- Behavior: May remove parts of the video to achieve exact size
- Example use: Social media videos, video thumbnails
fill
- Resize and Crop
Resizes the video to fill the specified dimensions while maintaining aspect ratio, then crops excess pixels.
- Best for: Hero videos, featured content
- Behavior: Ensures entire space is filled without distortion
- Example use: Website headers, video backgrounds
fit
- Preserve Content
Resizes video to fit within specified dimensions while maintaining aspect ratio, with no cropping.
- Best for: Product videos, instructional content
- Behavior: May leave empty space on sides or top/bottom
- Example use: Video galleries, educational content
scale
- Simple Resize
Basic resize that may change aspect ratio to match exact dimensions.
- Best for: When aspect ratio isn’t critical
- Behavior: May stretch or compress video
- Example use: Background videos, non-critical content
limit
- Downscale Only
Only scales down videos that are larger than specified dimensions.
- Best for: User-uploaded content
- Behavior: Never enlarges small videos
- Example use: Forum attachments, user galleries
pad
- Add Padding
Resizes within dimensions and adds padding to reach exact size.
- Best for: Consistent layouts requiring exact dimensions
- Behavior: Adds padding to maintain aspect ratio
- Example use: Video grids, multi-video layouts
- Supports background options (solid color or blur)
Gravity Control
Use g_{position}
to control the focal point during cropping. Only works with crop
and fill
modes:
Standard Positions
Background Options
When using pad
mode, control the padding appearance: