A video's file size is its bitrate multiplied by its length, so you make it smaller by cutting one or both: trim what you don't need, lower the resolution, compress a little harder, or switch to the more efficient HEVC codec. Phones and cameras record at generous bitrates, so a careful re-encode can usually make a file much smaller with little visible loss. The trick is changing one thing at a time and checking the result.
Where the size comes from
Bitrate is how much data each second of video uses, usually given in megabits per second (Mbps). The sum:
size in megabytes = bitrate in Mbps × length in seconds ÷ 8
So a 4-minute video (240 seconds) at 20 Mbps is 20 × 240 ÷ 8 = 600 MB. The same video at 5 Mbps is 150 MB. Sound barely matters: 128 kbps of AAC audio over 4 minutes is under 4 MB. To shrink a file, you have to reduce the video bitrate or the length. Everything below is a way of doing that. For the background, see video bitrate explained.
Your options, from gentlest to harshest
| Change | How much it saves | What it costs |
|---|---|---|
| Trim the parts nobody needs | In proportion to what you cut | Nothing |
| Re-encode at a sensible quality setting | Often a lot, for phone and camera files | Very little if you don't push it |
| Switch from H.264 to HEVC | Noticeably smaller at the same quality | Older devices and some Windows PCs can't play it; slower to encode |
| Lower the resolution (4K to 1080p, 1080p to 720p) | A lot | Less detail, mostly visible on big screens |
| Lower the frame rate (60 to 30 fps) | Some | Less smooth motion |
| Squeeze the quality setting hard | A lot | Blockiness, smeared detail, banding in skies and dark scenes |
Two things that don't help: zipping a video (it's already compressed, so a zip file is barely smaller) and compressing the same file again and again (each round loses quality; always start from the original).
With HandBrake (free, for Mac, Windows and Linux)
HandBrake is the easiest free tool for this.
- Open HandBrake and drag your video onto its window (or use Open Source).
- Open Presets and choose a starting point from General. Fast 1080p30 is a good default; Fast 720p30 for something smaller.
- On the Summary tab, check the format is MP4, and tick Web Optimized.
- On the Video tab, choose the Video Encoder: H.264 (x264) plays everywhere, H.265 (x265) is smaller.
- Leave Constant Quality selected. The number is called RF: a higher RF means a smaller file and lower quality. HandBrake's own guide suggests RF 20 to 24 for 1080p and 22 to 28 for 4K with these encoders. If the file is still too big, raise RF by 2 and try again.
- Choose where to save the file, then press Start (Start Encode on Windows).
Two things to know about presets:
- The numbers in a preset's name are maximums. HandBrake names its General presets by the largest resolution and frame rate they produce, so Fast 1080p30 turns 4K into 1080p and 60 fps into 30. If you want to keep 60 fps, set Framerate on the Video tab to Same as source.
- The Social presets aim at a file size. Presets such as Social 25 MB 2 Minutes 540p60 are built to produce a file of 25 MB or less from a clip up to the length in the name.
Before you convert a long video, encode a short section first (HandBrake's Range setting lets you pick a few chapters or seconds) and check it on the screen it will be watched on.
With FFmpeg
FFmpeg is a free command-line tool. These commands are a good starting point; change the file names to yours.
Re-encode at a sensible quality:
ffmpeg -i input.mp4 -c:v libx264 -crf 23 -preset medium -c:a aac -b:a 128k -movflags +faststart smaller.mp4
-crf is the quality setting. For H.264 the scale runs from 0 (lossless) to 51 (worst), and 23 is the default. Raising it by 6 roughly halves the bitrate. Around 18 looks almost identical to the source; above 28 the damage starts to show. -preset slow instead of medium makes a slightly smaller file at the same quality, in more time.
Lower the resolution to 1080p as well:
ffmpeg -i input.mp4 -vf "scale=-2:1080" -c:v libx264 -crf 23 -preset medium -c:a aac -b:a 128k -movflags +faststart smaller-1080p.mp4
scale=-2:1080 makes the video 1080 pixels tall and works out the width to keep its shape. That's for landscape videos; for a vertical video, use scale=1080:-2 so it ends up 1080 pixels wide.
Use HEVC (H.265) instead:
ffmpeg -i input.mp4 -c:v libx265 -crf 28 -preset medium -tag:v hvc1 -c:a aac -b:a 128k -movflags +faststart smaller-hevc.mp4
The x265 encoder's default is CRF 28, which looks roughly like CRF 23 in H.264 but in a smaller file. -tag:v hvc1 lets Apple devices recognise and play the file. Before you choose HEVC, check the people you're sending it to can play it: H.264 vs H.265 vs AV1 compares the trade-offs.
Trim without re-encoding:
ffmpeg -ss 00:01:30 -i input.mp4 -t 45 -c copy clip.mp4
This keeps 45 seconds starting at 1 minute 30. Because -c copy doesn't re-encode, it's instant and loses nothing, but the cut can only start on a keyframe, so it may begin a fraction of a second early.
Hitting an exact file size
When a site or app has a hard limit, work out the bitrate backwards from it:
- Turn the limit into megabits: 25 MB × 8 = 200 megabits.
- Divide by the length in seconds. For a 2-minute video: 200 ÷ 120 = 1.67 Mbps for everything.
- Take off the audio (0.128 Mbps) and leave some headroom: about 1.4 Mbps for video.
- Pick a resolution that suits that bitrate. At 1.4 Mbps, 720p looks better than a starved 1080p.
Then use two-pass encoding, which spreads the bits where they're needed and lands close to the target:
ffmpeg -y -i input.mp4 -vf "scale=-2:720" -c:v libx264 -b:v 1400k -pass 1 -an -f null /dev/null
ffmpeg -i input.mp4 -vf "scale=-2:720" -c:v libx264 -b:v 1400k -pass 2 -c:a aac -b:a 128k smaller.mp4
On Windows, replace /dev/null with NUL. Keep the settings the same in both passes.
On a phone
- Trim on an iPhone: open the video in Photos, tap Edit, drag the ends of the frame strip at the bottom, tap Done, then Save Video as New Clip so the original is kept.
- Trim on Android: Google Photos and most makers' Gallery apps have a trim tool under Edit; the names vary by phone.
- Make future videos smaller: on an iPhone, Settings › Camera › Formats › High Efficiency records HEVC, and Settings › Camera › Record Video lets you pick 1080p instead of 4K. The Record Video screen also shows roughly how much space a minute takes at each setting.
- On a Mac, QuickTime Player's File › Export As offers smaller resolutions such as 1080p and 720p, and on most recent Macs a choice of H.264 or HEVC.
If you're also joining clips
Join first, then compress once. Every re-encode costs a little quality, so make compression the last step. Merging tools that re-encode, such as ClipMerge, save the joined video at a high quality setting with no size options, so if the result is too big for where it's going, shrink the joined file with HandBrake or FFmpeg as above. Sometimes a smaller file isn't needed at all: see how to send a large video file for links, AirDrop and other ways round size limits.
Common problems
The "compressed" file is bigger than the original. The original was already at a low bitrate, and your quality setting is higher than it. Raise the RF or CRF, or keep the original.
It looks blocky or smeary, especially in dark scenes or skies. The bitrate is too low for the resolution. Lower the resolution and raise the bitrate, rather than squeezing a big picture into too few bits.
It won't play on someone's computer. You probably used HEVC. Re-encode to H.264.
The picture is fine but it's still too big. Look at the length. Trimming dead time is the only cut that costs nothing at all. Video resolution explained shows how much each step down in resolution saves.