X

Send us a Topic or Tip

Have a suggestion for the blog? Perhaps a topic you'd like us to write about? If so, we'd love to hear from you! Fancy yourself a writer and have a tech tip, handy computer trick, or "how to" to share? Let us know what you'd like to contribute!

Thanks for reaching out!

How to Make Your Videos as Small as Possible Without Losing Quality

I want to show you how to shrink your video and guarantee its quality. And I’m going to do that with something called Constant Encoding, using an open-source tool called Handbrake

Quality, not quantity

I’ll start with a minute-long 4K/UHD video that is the type of file you’d get out of a GoPro or other action camera. It’s currently 490 MB (half a gigabyte!), but I’m going to use Handbrake to shrink it down to 12MB.

My 490 MB UHD source file in Handbrake

While I’m going to use Handbrake for this project, you could achieve the same effect using other tools like the flexible Shutter Encoder. Typically, professional encoding tools like Apple Compressor or Adobe Media Encoder, don’t approach encoding in the same way. They focus on how large a file will be.

What I care about is the quality. Instead of focusing on size, I want quality to be the critical factor. Handbrake/Shutter Encoder and FFMPEG have this capability—and they’re all free tools!

Choosing encoding settings in Handbrake

When you bring a video into Handbrake, it’s easiest to start the process by using one of the presets Handbrake provides. This will guarantee that the resolution and frame rate of your video output matches the source. For my project, I used the Preset called Production Standard as my starting point.

Choosing Production Standard guarantees that my output and source files will match.

Nearly any time you compress video, you’ll experience some quality loss. Handbrake lets you choose encoding settings specifically based on how much quality you want to retain. On the Video Tab, you’ll see a Quality setting. It goes from 51, super damaged, to 0, nearly lossless. 

Handbrake’s Constant Quality slider

For HD (1920×1080 or 1280×720) video, the Quality sweet spot is around 18-23. For UHD (3840×2160) video, you can go up to 28. 

Handbrake’s default codec, H.264, is excellent, and compatible with nearly every phone and tablet. For higher-quality compression at lower bitrates (reduced file size), you can use HEVC (aka H.265). But keep in mind that it’s less compatible with older hardware.

The final setting that determines the size of your exported video file (and, of course, how long the encoding will take0 is the preset slider for Speed. Your choices are as follows:

  • Ultra fast
  • Super fast
  • Very fast
  • Faster
  • Fast
  • Medium
  • Slow
  • Slower
  • Very slow
  • Placebo
Choosing a speed preset to determine file size

The slower the speed, the smaller the file. You should never use Placebo for video you plan to distribute online because that’s meant just for internal testing.

My encoding settings

At a setting of 23, I got a couple of interesting results. Fast with H.264 took 3 minutes, and shrank the file to 105 MB, one-fifth its original size. Not bad.

My test results

Fast HEVC took 5 minutes and reduced the file size to 37 MB. That’s almost 1/20th of the file’s original size.

I tested several other settings, with fairly predictable results comparable to those above, but one result surprised me. Ultrafast HEVC took only 2 minutes, but gave me a smaller file than any of the other choices. The Ultrafast HEVC file came in at 22MB—1/22nd of the original. It did better than Slow, Slower, or Very Slow.

That’s strange. Ultrafast should have been larger than any other choice.

Pushing the envelope for UHD

I did most of my tests at a Quality setting of 23. But since this source was UHD, for my final test, I wanted to push the envelope a little further by increasing my Quality setting to 28, Ultrafast.

What did I get?

At Quality 28, Ultrafast, Handbrake compressed my 490MB file to 12MB, which means that it was small enough to send it to someone by email. To a video pro, accustomed to working with massive files, that’s crazy.

My final test: 12 MB for a 1-minute UHD file!

Quality first

In summary, Constant Quality encoding prioritizes quality, and output file size is dictated by the speed of the encoding. By using Handbrake—a free, open-source tool—I was able to shrink my video fast, and make it as small as I needed while retaining the quality.

(Footnote: As a media nerd, I’ll let you know the original was in the H.264 codec, 23.976 fps, at 65 Mb/s. The final file was in HEVC at 1.5 Mb/s. Contact me if you want more details)

Jeff Greenberg
the authorJeff Greenberg
Jeff Greenberg is an Editor/Colorist/Consultant in post. An early adopter, he sent his first email in the 80s. He chairs conferences and is a Master Trainer (teaches the “Train the trainer” classes for the major NLEs.) Most of all, he’s a Dad and Filmgeek. And hates being defined by fifty words. Just like you.
Be Sociable, Share This Post!

Leave a Reply

Comment

Name

6 Comments

  • I’m trying this again:
    Summary tab: Preset to Production Standard, Format to MP4. Also under Format is “Passthru Common Metadata” is checked.
    Dimensions tab: all instances have the original dimensions of 4096×2304.
    Video: Video Encoder is H.264 (x264), Constant Quality is 18, and Preset is fast.
    I’ll send you the link but don’t know how to do it privately.
    Thanks

  • Following your instructions, my first 2 videos ended up half the size of the original — great! However… the next 2 got larger. A 2.34 GB file became 4.06 GB; a 2.61 GB file became 9.35 GB. I’m using Handbrake 1.5.1 & noticed 2 differences from yours to mine: Under Format, “Passthru Common Metadata” is checked (yours doesn’t show that at all) & you have Filters showing, mine says “None.” (I’m on an iMac 2017 running Catalina 10.15.7.) Do you have any idea what I might be doing wrong?

    • Lynn,

      Nothing obvious – but it’s hard given I can’t see two things:

      The characteristics of the original file – its encoding dictates the original size.

      The exact settings that you used in handbrake.

      You could create screenshots of the settings.
      You could send me a link (privately) for the media and I could see if I have the same problem.
      You can reach out to me directly (and yes, I’d figure it out for free).

      Happy to help if I can.

  • Very helpful!! Thank you! Video codecs are so confusing to me, and is probably why I never bothered trying to shrink my video files, even though I knew I needed to. Can’t wait to try on my next project!