Last updated: Dec-11-2024
On this page:
Overview
Learn how to crop a video using content-aware AI to keep the most interesting part of the video in the crop.
Video tutorial
Tutorial contents
This tutorial presents the following topics. Click a timestamp to jump to that part of the video.
Resize and crop videos with Cloudinary
0:04 | You can resize and crop videos on the fly with Cloudinary by including transformation parameters in the delivery URL, for example c_fill,h_600,w_600 to fill a 600 x 600 pixel square with the video. |
Use automatic gravity
0:34 | When videos are cropped using c_fill , the center of the video is focused on by default. This may not always be the most interesting part of the video, so to fix this, use automatic gravity (g_auto ). |
Use compass points for gravity
0:47 | You can also use compass points for gravity, such as g_west , which will focus on the left-most part of the video in the crop. |
Keep learning
Related topics
- Watch more Dev Hints videos on the Cloudinary YouTube channel.
- Learn more about cropping videos using automatic gravity.
- Discover more transformations in the Transformation URL API reference.
- Take a look at the User-generated content guide to see all the features you can take advantage of when displaying user-generated content on your site.
If you like this, you might also like...
Transformation Basics
Learn the basics of a transformation URLGravity Crops for Images
Indicate which areas to keep when croppingComplex Transformations
Combine transformations to generate a 3D canvas
Check out the Cloudinary Academy for free self-paced Cloudinary courses on a variety of developer or DAM topics, or register for formal instructor-led courses, either virtual or on-site.
✖️