Cloudinary Blog

New Auto-Quality Setting for Content-Aware Video Compression

New q_auto Setting For Content-Aware Video Compression

It’s widely known that video is the most effective way of communicating your brand to your audience. It is also an extremely varied medium. Take a look at the existing videos in your media library, you’ll find videos with differing lengths, colors, brightness and density of content. All of these videos need to be optimized in a different way. Cloudinary’s new automatic video quality can intelligently analyze each and every video to encode it using the most optimized settings, ensuring the best trade-off between file size and visual quality, whilst also maintaining a consistent experience throughout. All you need to do is set the quality parameter to auto (q_auto in URLs) and Cloudinary will take care of the rest.

Video plays an important role across the web, but that comes at the cost of production time and bandwidth. Cloudinary’s Dynamic Video Platform with on-the-fly encoding and manipulation offers up a simple way to improve the viewing experience with faster load times, whilst reducing bandwidth costs and saving time with video editing. However, up until now it’s been a one-size-fits-all solution when it comes to quality. Now you can properly automate video quality to ensure consistent appearance no matter the complexity.

Webinar
Delivering Compelling Video Experiences at Scale

Consistently Inconsistent Automation

Cloudinary has always allowed you to define a specific quality value to use on your videos - most use 70 out of 100. Whilst this may seem like a great way to ensure all your videos appear with similar visual quality, this is not necessarily the case due to the wide-ranging content and resolutions of your videos.

Take the video of a croissant below, it’s a simple, low resolution video with limited colors and a short duration. We've set the quality to 70 which visually degrades the video even further. Now contrast this with the aerial video of a bridge, it is much higher resolution, involves more movement, landscapes and colors, and has a longer duration. We've also set this to q_70, and now we have a video that maintains a high quality but not necessarily the most optimal file size.

Instead, if we use automatic quality instead of a static quality value of 70, we can improve the video quality of the croissant video with very limited effect on the video file size. And, the aerial video has its quality maintained, whilst reducing the file size by around 10%.

If you really want to automate your video delivery workflow and ensure that consistent experience then automatic quality is great way to achieve this with very limited changes to your code. By using automatic quality, you can strike the right balance based on the content of the video ensuring every video has a consistent look.

Note
Editing your video delivery URLs will require Cloudinary to re-encode your videos. We recommend doing this eagerly in advance of the new videos being delivered, to ensure your users are not waiting for this to happen when first requested.

Fine Tuning the Experience for Efficient Video Optimization

We’ve already seen how simple it is to deliver consistent content-aware videos but what if we want a little bit more control? The automatic quality parameter can take additional configuration options to make it work for all of your use-cases.

You’re not going to want a super high-quality video all of the time. You might have some short thumbnail previews or want to aggressively reduce your bandwidth costs as a consequence of high-levels of traffic. For this you can use the eco or low options (q_auto:eco or q_auto:low in URLs). In the example below we've taken the original video (5.95MB), and we've reduced the video to thumbnail size and combined this with q_auto:low to deliver a video that is just over 175KB.



On the flip-side, you might have some videos, such as product videos, that you really need to show off and deliver in the best quality possible. Of course you’ll still get the benefits of Cloudinary’s intelligent encoding to reduce the file-size but the effects won’t be quite so dramatic. You can use the best option to achieve this (q_auto:best in URLs). Let’s take the same video as above, but this time we want to deliver the full video in the best possible quality.



We’ve delivered this video at 3.77MB and therefore managed to drop the file size by about a third, whilst also ensuring the video looks great visually.

Comparing Video Quality

To get a better idea of how the various quality settings affect the appearance and size of the videos, take a look at the comparison below. Select a different auto quality setting and see how the hourglass video is affected. You can also try out a comparison with your own videos using our video comparator demo for more.

Quality: auto:low
Size: 170.27KB
auto:low auto:eco auto:good auto:best 80 100

Here’s the full list of automatic video quality settings:

  • q_auto - The optimal balance between file size and visual quality. By default, this is the same as q_auto:good.
  • q_auto:best - Less aggressive algorithm. Less aggressive algorithm. Generates videos with better visual quality but slightly larger file sizes.
  • q_auto:good - Ensuring a relatively small file size with good visual quality. Example of a target audience: stock media sites that display videos with a high visual quality.
  • q_auto:eco - More aggressive algorithm, which results in smaller files of slightly lower visual quality. Example of a target audience: popular sites and social networks with a huge amount of traffic.
  • q_auto:low - Most aggressive algorithm, which results in the smallest files of low visual quality. Example of a target audience: sites using thumbnail preview videos that then link to higher quality videos.

On top of all this, Cloudinary’s Dynamic Video Platform has a number of features to ensure you get the best results possible from your media. You can combine our new automatic quality setting with automatic video transcoding and content-aware video cropping functionality to achieve complete end-to-end automation and optimization.

What’s Next?

Automation and consistency are big factors when it comes to your videos. With Cloudinary’s new automatic quality for videos, it’s super simple to solve these issues, ensuring you deliver your videos at the right quality with the lowest possible bandwidth usage. Don’t forget you can fine-tune it too, matching your needs and use cases. Go ahead and set your quality parameter to auto (q_auto in URLs) and see the difference it makes. Check out the documentation for more detailed information and have a play with our video comparator demo to see it all in action.

Recent Blog Posts

Transitioning JPEG-Based to JPEG XL-Based Images for Web Platforms

When the JPEG codec was being developed in the late 1980s, no standardized, lossy image-compression formats existed. JPEG became ready at exactly the right time in 1992, when the World Wide Web and digital cameras were about to become a thing. The introduction of HTML’s <img> tag in 1995 ensured the recognition of JPEG as the web format—at least for photographs. During the 1990s, digital cameras replaced analog ones and, given the limited memory capacities of that era, JPEG became the standard format for photography, especially for consumer-grade cameras.

Read more

Amplify Your Jamstack With Video

By Alex Patterson
Amplify Your Jamstack With Cloudinary Video

As defined by Amazon Web Services (AWS), Amplify is a set of products and tools with which mobile and front-end web developers can build and deploy AWS-powered, secure, and scalable full-stack apps. Also, you can efficiently configure their back ends, connect them to your app with just a few lines of code, and deploy static web apps in only three steps. Historically, because of their performance issues, managing images and videos is a daunting challenge for developers. Even though you can easily load media to an S3 bucket with AWS Amplify, transforming, compressing, and responsively delivering them is labor intensive and time consuming.

Read more
Cloudinary Helps Move James Hardie’s Experience Online

While COVID has affected most businesses, it has been particularly hard on those that sell products for the physical ‘brick and mortar’ world. One company that literally fits that bill is our Australian customer James Hardie, the largest global manufacturer of fibre cement products used in both domestic and commercial construction. These are materials that its buyers ideally want to see up close, in detail. When customers have questions, they expect personal service.

Read more
How to Build an Enhanced Gravatar Service, Part 2

Part 1 of this post defines the capabilities of an enhanced Gravatar service, which I named Clavatar, and describes the following initial steps for building it:

This post, part 2 of the series, explains how to make Clavatar work like Gravatar and to develop Clavatar’s capabilities of enabling requests for various versions of the images related to user accounts.

Read more