Back to Blog
    Tutorial
    8 min read
    Compressnfly Team
    Updated

    How to Compress a Video Without Ruining It: Settings That Actually Work

    Video is the one file type where "just compress it" can go badly wrong. Push the settings too far and you get smeared faces and blocky shadows. Push them the wrong way and the "compressed" file comes out bigger than the original, which happened in our own test below.

    This guide gives you the one formula that predicts video file size, real results from re-encoding a clip at different settings, and the exact HandBrake settings to use when you need a video under a specific size.

    The short answer

    • Video size = bitrate × length. Cutting the length is the most effective compression there is.
    • For a smaller file with good quality, use H.264 with a quality setting (RF/CRF) of 23–28.
    • Lowering resolution (1080p → 720p) cuts size a lot and is barely noticeable on a phone screen.

    The formula that explains every video file

    A video's size depends on two things: how many bits it uses per second (the bitrate) and how many seconds it lasts. Resolution, frame rate and codec only matter because they change the bitrate you need for good quality.

    Total bitrateSize per minuteTypical use
    1 Mbps7.5 MBSmall 480p clips, screen recordings
    2.5 Mbps19 MBGood-looking 720p
    5 Mbps38 MBGood-looking 1080p
    10 Mbps75 MBHigh-quality 1080p
    20 Mbps150 MBPhone-camera 1080p, or 4K for sharing

    (Megabytes in this table are 1,000,000 bytes: 1 Mbps × 60 seconds = 60 megabits = 7.5 megabytes. The test results below use the sizes your computer shows.)

    Phone cameras record at high bitrates so they capture motion cleanly the first time, which is why a short clip can run to hundreds of megabytes. On an iPhone, Settings → Camera → Record Video shows the approximate size of a minute of video for each option, which makes the trade-off easy to see.

    Our test: re-encoding one clip at different settings

    We took a 60-second clip of the open-source animated film Big Buck Bunny (640×360, H.264, 5.26 MB) and re-encoded it with x264, the same H.264 encoder that HandBrake uses. To measure quality we used SSIM, a standard score where 1.000 means identical to the source and anything above about 0.98 is very hard to tell apart by eye.

    SettingFile sizevs originalQuality (SSIM)
    Original5.26 MB—1.000
    H.264, CRF 187.80 MB+48%0.993
    H.264, CRF 23 (default)4.94 MB−6%0.987
    H.264, CRF 283.08 MB−41%0.972
    H.264, CRF 322.09 MB−60%0.950
    H.264, CRF 23, scaled to 240p2.96 MB−44%0.951
    H.265, CRF 283.24 MB−38%0.972

    What this taught us:

    1. "High quality" re-encoding can make a file bigger. CRF 18 grew the clip by 48%. The original was already compressed, so the encoder spent extra bits faithfully copying its existing blur and artifacts. If a video is already a reasonable size, re-encoding it at high quality is pointless.
    2. CRF 28 is the sweet spot for shrinking. 41% smaller, with a quality score still above 0.97. Watching it normally, the difference was hard to spot.
    3. Every step costs more quality. CRF 32 saved more, but it softened detail noticeably in darker scenes.
    4. H.265 isn't magic on small videos. On this low-resolution clip it was no smaller than H.264 at the same quality. Its advantage shows up mainly at 1080p and 4K, and some older devices and websites can't play it, so H.264 is the safer choice for sharing.

    How to hit a size limit exactly

    When a video must fit under a limit, like a 25 MB email attachment, work backward from the formula:

    Video bitrate (kbps) = limit in MB × 8,000 ÷ length in seconds − audio bitrate

    Then take about 10% off for safety, since container overhead and the email encoding trap described in our file size limits guide both add size.

    Video lengthMax video bitrate for 25 MB*Resolution that looks decent
    30 seconds~5,900 kbps1080p
    1 minute~2,880 kbps720p
    2 minutes~1,380 kbps480p–720p
    5 minutes~480 kbps360p, or share a link instead

    *With 128 kbps audio and a 10% safety margin. For a different limit, put your own number into the formula.

    Past about 5 minutes, email simply isn't the right tool. Upload the video to Google Drive, OneDrive or YouTube (unlisted) and send the link.

    Step by step in HandBrake (free, Windows/Mac/Linux)

    To make a video smaller with good quality

    1. Open the video in HandBrake.
    2. Pick a preset from the General list: Fast 720p30 for sharing, or Fast 1080p30 if you need full HD.
    3. On the Video tab, keep the encoder on H.264 (x264) and set Constant Quality to RF 24–28. Higher numbers mean smaller files.
    4. On the Audio tab, AAC at 128 kbps is plenty for most videos.
    5. Choose where to save and click Start Encode.

    To hit a specific size

    1. Calculate the video bitrate with the formula above.
    2. On the Video tab, choose Avg Bitrate (kbps) instead of Constant Quality and enter your number.
    3. Tick Multi-Pass Encoding. It takes twice as long but spreads the bits much more evenly, so fast scenes don't fall apart.

    Three easier wins before you compress

    • Trim it. Cutting a 2-minute clip to the 40 seconds that matter shrinks it by two-thirds with zero quality loss. Both iPhone and Android galleries have a trim tool in the editor.
    • Record smaller in the first place. If you're filming something just to send, 1080p at 30 fps is plenty. 4K at 60 fps creates huge files you'll only need to shrink later.
    • Drop the audio if it isn't needed. For screen recordings and silent demos, removing the audio track saves a little and avoids background noise.

    Why Compressnfly doesn't compress video (yet)

    Compressnfly does everything inside your browser so your files are never uploaded. That works brilliantly for images, PDFs and documents. Video encoding is far heavier: a phone video can take many minutes to re-encode in a browser tab and use a lot of memory. Rather than offer a slow, unreliable video tool, we recommend HandBrake, which is free, runs on your own computer and is also private. For everything else, the Compressnfly compressor is a click away.

    FAQ

    What's the best video format for sharing?

    MP4 with H.264 video and AAC audio. Virtually every phone, computer, browser and app can play it.

    Does WhatsApp compress videos?

    Yes, videos sent the normal way are compressed by WhatsApp. To send the original quality, send it as a document instead.

    What does CRF or RF mean?

    It's a quality target: the encoder uses whatever bitrate each scene needs to reach that quality. Lower numbers mean better quality and bigger files. About 6 steps roughly doubles or halves the size.

    Will compressing a video twice make it worse?

    Yes. Each lossy encode loses a little more detail, so always compress from the original file.