Command-line Knowledge Base

Handbrake

How to Compress Videos

  1. Import Your Video

    Click on Open Source in the top toolbar or click File > Open Source.

  2. Choose a Compression Preset

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

    Click on Presets in the top toolbar or select a preset from the preset dropdown menu under the top toolbar:

    • Very Fast 720p30 for medium compression.
    • Very Fast 480p30 or Fast 480p30 for more aggressive compression.
    • Super Fast 480p30 for a tiny file.

  3. Adjust Basic Output Settings

    • Make sure the Summary tab is set to MPEG-4 (avformat) (the most compatible format).
    • Video Codec: Choose H.264 (x264) for efficient compression.

  4. 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.
  5. Optimize Resolution

    Note: I just accepted the defaults.

    • In the Dimensions tab, reduce the resolution (e.g., width of 640 pixels) while keeping the aspect ratio locked.

  6. 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.

    Note: I just accepted the defaults.

  7. Trim Unnecessary Sections (optional)

    To remove unwanted parts or extract video clips:

    • Under the top toolbar, set Range from default Chapters to Seconds.
    • Enter the exact start and end times for the clip you wish to extract.
  8. Save and Compress

    • Choose a destination folder and name for the compressed file by clicking Browse.
    • Click the Start Encode button.