Image & Video APIs

Content-aware video cropping (video tutorial)

Last updated: Aug-20-2025

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


This video is brought to you by Cloudinary's video player - embed your own!
Use the controls to set the playback speed, navigate to chapters of interest and select subtitles in your preferred language.

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

Jump to this spot in the video  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

Jump to this spot in the video  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

Jump to this spot in the video  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

If you like this, you might also like...

 

Cloudinary Academy

 

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.

 

✔️ Feedback sent!

Rate this page: