If you’re still manually converting MOV to MP4, compressing videos with desktop tools, or hardcoding delivery formats, you’re introducing avoidable delays and bloated files into your digital media pipeline.
For teams running media-rich websites or e-commerce storefronts, this adds up quickly to slower load times, uneven quality across devices, and more manual work to get videos production-ready.
This guide walks you through the process of automating video optimization at the point of upload using Cloudinary. You’ll define upload presets, set transformation rules, and trigger post-upload workflows so that every video is automatically compressed, resized, reformatted, and enriched with metadata or AI-generated tags.
Cloudinary’s upload presets allow you to define the transformation rules that are automatically applied every time a video is uploaded via the API/SDK or through the Media Library.
To create an upload preset, follow these steps:
- Log in to your Cloudinary account, go to the Console Settings Upload Presets page, and click the Add Upload Preset button.

- Under the General section:
- Give a name to the upload preset.
- Select a preferred signing mode based on your use cases.
- Suggest a folder, optionally, where the transformed video will be stored.

- Under the Transform section, you’ll define the video transformations that are applied automatically when a video is uploaded. There are two main ways to do this:
- Use Incoming transformations to apply the transformation when the file is uploaded. These are ideal for applying consistent quality and format rules across all uploaded assets, and the result becomes the “original” asset stored in Cloudinary.
- Use Eager transformations to apply the transformation after the upload completes, generating alternate video versions in the background or immediately if applied synchronously. You can ask Cloudinary to apply transformations asynchronously, but you will need to provide a webhook URL so that Cloudinary can notify you once the transformation is complete.

As shown in the image above, the transformation parameters are applied asynchronously, and a webhook notification URL is set to receive the transformation result response. Here’s a breakdown of the transformation:
q_auto
. Automatically adjusts quality for best visual performance and file sizef_auto
. Delivers WebM, MP4, or other formats based on browser/device supportw_1080,c_limit
. Scales video down to 1080px max width while keeping aspect ratiovc_auto
. Uses an efficient video codec, e.g., h264, vp9, or h265.
- To generate captions and chapters for the video, toggle the Auto transcription and Auto chaptering buttons under the Manage and Analyze section.

- After modifying your preset settings to fit your needs, click the Save button in the top right corner of the screen to save the upload preset. Your newly created preset will appear on the Upload Presets page.

- To set the default preset for your uploads for any asset, click the Manage Defaults button. Select theUpload Preset you wish to apply by default. For example, select an Unsigned Upload Preset to automatically apply transformations to manual uploads via the Media Library, which applies to all asset types, including images, videos, and raw files. This will ensure the transformations are consistent without requiring any additional code.

Now that your upload preset is ready, let’s explore the various ways to upload your video assets to Cloudinary.
Uploading your video to Cloudinary makes applying Cloudinary’s transformations easy and delivers an optimized version directly to your website. There are two simple ways to upload your video.
You use the Media Library when you want to upload manually. To do this:
- Log in to your Cloudinary console.
- Go to the Media Library tab.
- Click Upload, select your video file, and wait for the upload to complete.

If you want to upload from your app or project, Cloudinary’s SDK makes it easy. First, install your platform’s SDK and then upload your video directly to Cloudinary.
For example, here’s how to do it in Node.js:
- Install the SDK:
npm install cloudinary
- Configure Cloudinary:
// cloudinary-config.js
const cloudinary = require('cloudinary').v2;
cloudinary.config({
cloud_name: 'your-cloud-name',
api_key: 'your-api-key',
api_secret: 'your-api-secret'
});
module.exports = cloudinary;
Code language: JavaScript (javascript)
You can get your Cloudinary API key and API secret from the settings page in your console.
- Upload the video:
// upload-video.js
const cloudinary = require('./cloudinary-config');
cloudinary.uploader.upload('path/to/video.mp4', {
resource_type: 'video'
})
.then(result => {
console.log('Upload successful!');
console.log('Video URL:', result.secure_url);
})
.catch(error => {
console.error('Upload failed:', error);
});
Code language: JavaScript (javascript)
After the upload is complete and the preset transformations are applied, Cloudinary will send an upload response to the webhook URL you configured. This response contains metadata about the uploaded video, including its public ID, secure delivery URL, width, height, duration, format, and other relevant details, which you can use to trigger additional processing or notify other services in your pipeline.
This is what the webhook response looks like:
// upload-video.js
const cloudinary = require('./cloudinary-config');
cloudinary.uploader.upload('path/to/video.mp4', {
resource_type: 'video'
})
.then(result => {
console.log('Upload successful!');
console.log('Video URL:', result.secure_url);
})
.catch(error => {
console.error('Upload failed:', error);
});
Code language: JavaScript (javascript)
To see the video, transcription, and chapter files, navigate to the Media Library in your Cloudinary console and click on the Assets tab. The respective files will be there.

In the next section, you’ll use the webhook response to trigger additional post-upload processing on your video asset, such as Google AI tagging, using MediaFlows.
Cloudinary’s MediaFlows allows users to build and automate media workflows with a low-code or no-code approach. It has a drag-and-drop interface, integrations with platforms like Shopify, and pre-built templates for managing media at scale. MediaFlows has two development options: EasyFlows for no-code automation and PowerFlows for full customization.
EasyFlows is a no-code, natural language tool that enables non-developers to automate asset management using triggers and actions. It simplifies tasks such as branding control, asset expiration, and auto-tagging through an intuitive workflow builder. PowerFlows offers more advanced customization, allowing users to create workflows from functional blocks that each perform specific actions, providing more trigger options and greater flexibility for managing media assets compared to EasyFlows.
Let’s walk through how to use PowerFlows for the post-upload optimization.To create a new PowerFlow from the MediaFlows page, click on the New PowerFlow tab.

Clicking the button takes you to the PowerFlows page, where you can start building your workflow.
Next, click on the + icon in the left sidebar to see the list of Blocks you can use to build your workflow.

Under each category, a set of blocks is available for you to choose from, allowing you to build the workflow to the level of complexity you require.
To build the post-upload optimization workflow, follow these steps:
- Clear the canvas to start fresh, and under the Triggers category, drag the Catch Webhook block and link it to the Add To Logs block.
- Open the Catch Webhook block and set the Exposed payload fields option to
public_id
. This sets the public ID of the video asset to a variable. Click the + icon and save your changes to the block.

Before proceeding, copy the Webhook URL from the catch webhook block and replace it in the upload preset you created earlier. This allows PowerFlow to listen to the webhook notification from the optimization and utilize the data.
- Next, under the Cloudinary add-ons block, drag the Google Video Tagging block to the canvas and link it to the Catch Webhook block. Open the Google Video Tagging block and set these fields:
- Set Public ID to the
public_id
variable from the Catch Webhook block by clicking the + icon at the far right and selecting the variable. - Set Delivery type to upload.
- Set Resource type to video.
- Click Done to save your changes to the block.
- Set Public ID to the

Google Video Tagging is an add-on by Cloudinary that uses the Google Cloud Video Intelligence API to automatically analyze video content and generate relevant tags based on detected objects, activities, and scenes. It processes the video frame by frame, identifying elements such as people, animals, vehicles, text, and actions. It assigns descriptive tags to the video, making it easier to search, categorize, and manage within your Cloudinary Media Library.
- Click the Save Changes button at the top right of the page to save your workflow.
- To test your workflow, follow these steps:
- Click the wheel icon beside the Test button at the top right of the page, and set the Action profile to “upload” and the Media URL to any of your Cloudinary video asset URLs.
- Save the changes and click on the Test button. This runs your workflow using a test asset, allowing you to view the results in real time.

From the result, you can see that the Google Video Tagging status is pending, indicating that the video is still being processed. Once the tagging is complete, the status will update, and the response will include a list of relevant tags automatically generated from the video content.

With this, you’ve completed an automated video optimization workflow. Every time a video is uploaded to your Cloudinary Media Library, the asset will automatically go through this end-to-end process. The video is optimized for format and quality, resized as needed, and populated with metadata or AI-generated tags, eliminating the need for manual steps. This approach reduces human error, like forgetting to compress or convert a large video file, and ensures your video asset is optimized and production-ready.
Sign up on Cloudinary to automate video optimization with upload presets and MediaFlows.
Resources: