Cloudinary icon

Cloudinary

Upload images and videos, build optimized transformation and delivery URLs, generate video players, and manage, search, tag, and edit metadata in your Cloudinary media library

Transform → Video: Crop

AI-generated

Overview

This node operation performs a video cropping transformation using Cloudinary's media management service. It allows users to specify the video asset by its public ID and apply cropping either by exact dimensions or by aspect ratio. Users can also define the focus area of the crop (auto, face, or center) and chain transformations by continuing from a previous transformation. This operation is useful for preparing videos for optimized delivery by cropping to desired sizes or aspect ratios, such as cropping a video to fit a specific player size or aspect ratio for social media sharing.

Use Case Examples

  1. Cropping a video to 1280x720 pixels focusing on the center of the video.
  2. Cropping a video to a 16:9 aspect ratio with automatic focus detection.
  3. Chaining a crop transformation after a resize transformation to fine-tune the video output.

Properties

Name Meaning
Public ID The public identifier of the video asset in Cloudinary, including any folder path but excluding the file extension. This is required to specify which video to crop.
Type The Cloudinary delivery type for the video asset. Usually set to 'Upload' for public assets. Other types like 'Private' or social media sources require signed URLs which are not supported by this node yet.
Continue From Transformation Optional previous transformation string to prepend before this crop operation, allowing chaining of multiple transformations into one delivery URL.
Crop By Method to crop the video either by exact dimensions or by aspect ratio.
Width Target width in pixels for cropping when cropping by dimensions.
Height Target height in pixels for cropping when cropping by dimensions.
Aspect Ratio Aspect ratio to crop to, specified as width:height (e.g., 16:9) or a decimal (e.g., 1.5), used when cropping by aspect ratio.
Width (Aspect Ratio) Optional target width in pixels when cropping by aspect ratio; height is derived from the aspect ratio.
Focus The part of the video to keep in focus when cropping. Options include automatic detection, face-centered, or center of the video.
Additional Options Additional optional parameters such as asset version to bust CDN caches.

Output

JSON

  • transformation - The resulting transformation string representing the crop operation to be used in the delivery URL.

Dependencies

  • Cloudinary API credentials including cloud name, API key, and API secret

Troubleshooting

  • Ensure the public ID is correct and the asset exists in the Cloudinary account.
  • Using delivery types like 'Private' or 'Authenticated' requires signed URLs which this node does not generate, so those URLs will fail to load.
  • If chaining transformations, ensure the previous transformation string is correctly passed to 'Continue From Transformation'.
  • Invalid crop dimensions or aspect ratio values may cause errors or unexpected results.

Links

Discussion