DEV Community

Cover image for How to Compress Videos Using HandBrake: A Step-by-Step Guide
BrendahKiragu
BrendahKiragu

Posted on

How to Compress Videos Using HandBrake: A Step-by-Step Guide

My Experience: Why I Needed HandBrake

I was applying for a remote job recently, and as part of the evaluation process, I needed to upload a video file of no more than a minute. After a couple of attempts (don’t worry if you don’t nail it on the first try – it happens to the best of us!), I finally recorded my video: 53 seconds long. 🎉

"Seven seconds less than the limit," I thought, "perfecto!" The video was concise and to the point.

Then came the moment of truth: uploading it to the application form. That’s where I hit a roadblock. Despite following all the guidelines, the upload wouldn’t go through. Frustrated, I reached out to the organization for help.

Their response? “Check your file size.”

Wait, what? File size?! This vital detail was conveniently omitted from the instructions. I felt stuck. Should I re-record my video? Maybe practice speaking even faster to shave more seconds off? 😅 But then I remembered something: I’m a developer, and "dev-life" revolves around solving problems (thanks, internet!).

That’s when I came across HandBrake, and with a little AI guidance, I found the solution and submitted my application just in time. In the spirit of paying it forward, I’ve written this guide to help anyone facing a similar challenge. Let’s dive in!

Step 1: Download and Install HandBrake

Visit the official HandBrake website: https://handbrake.fr.
Download and install HandBrake for your operating system (Windows, macOS, or Linux).

Step 2: Import Your Video

Launch HandBrake.
Drag and drop your video file into the main window, or click File to browse and select your video.

Step 3: Choose a Compression Preset

HandBrake offers pre-configured settings to balance quality and file size.

On the right side, pick a preset:
Very Fast 720p30 for medium compression.
Very Fast 480p30 or Fast 480p30 for more aggressive compression.
Need a tiny file? Go for Super Fast 480p30.

Step 4: Adjust Basic Output Settings

Format: Ensure it’s set to MP4 in the Summary tab (the most compatible format).
Video Codec: Choose H.264 (x264) for efficient compression.

Step 5: Fine-Tune Video Compression

In the Video tab:

Encoder Preset:
Set it to Slower or Very Slow (better compression but slower processing).

Constant Quality:
Increase the value (e.g., 28–30) for higher compression.

Step 6: Optimize Resolution

Go to the Dimensions tab.
Reduce the resolution (e.g., width of 640 pixels) while keeping the aspect ratio locked.

Step 7: Adjust Audio Settings

In the Audio tab:
Reduce the Bitrate to 96 kbps or lower.
Keep only one audio track if your video has multiples.
Step 8: Trim Unnecessary Sections
(Optional) To remove unwanted parts:

In the Summary tab, find the Range section.
Set custom start and end times to trim the video.

Step 9: Save and Compress

  • Choose a destination folder and name for the compressed file by clicking Browse.

  • Click the Start Encode button.

Step 10: Verify and Test

  • Check the compressed file size in the destination folder.
  • Upload it to your application or desired platform.
  • If the File Size is Still Too Large
  • Increase the Constant Quality value (e.g., 31 or more).
  • Further, reduce the resolution in the Dimensions tab.

Wrapping Up

HandBrake made compressing my video a breeze, saving me from re-recording or editing under pressure. Thanks to its powerful tools and some quick research, I was able to meet the size requirements and submit my job application on time. 🙌

If you’re struggling with video compression, don’t give up! HandBrake is a lifesaver, and now you have the steps to compress your videos with ease. Happy compressing! 🎥✨

Top comments (0)