DislifyDislify

Command Palette

Search for a command to run...

All articles
compressionFile CompressionVideo Compression

How to Compress a Video to a Specific File Size

Learn how to compress a video to a specific file size by targeting an approximate MB or percentage goal while preserving as much visual quality as possible.

By jack chynaAug 12, 20267 min read19 views
compress a video to a specific file size

How to Compress a Video to a Specific File Size

Sometimes you do not just want a smaller video.
You need the finished file to be close to a specific size.
Maybe you have a 200 MB video that needs to be around 100 MB, or a 75 MB clip that needs to fit below a 25 MB upload limit.
In those situations, choosing a random compression preset can involve a lot of trial and error.
A better approach is to compress the video toward a specific target size.

Can You Compress a Video to an Exact File Size?

You can usually get a video close to a target file size, but the result may not be exact.
Video compression depends on several factors, including:
Video length
Resolution
Frame rate
Video bitrate
Audio bitrate
Codec
Amount of movement in the video
Complexity of each scene
A video containing mostly static slides is much easier to compress than a fast-moving gameplay recording.
Because of this, a target of 50 MB may result in a file that is slightly above or below 50 MB.
For most situations, getting reasonably close to the target is enough.

Why Target File Size Instead of Using a Preset?

Compression presets are useful when you simply want to make a video smaller.
But they do not always know exactly how small you need the result to be.
For example, imagine you have a:
120 MB video
and you need it to be approximately:
50 MB
A balanced preset might produce a 70 MB file.
A stronger preset might produce a 35 MB file.
Both results are smaller, but neither is particularly close to your actual goal.
Target-size compression gives the encoder a clearer objective.

How Video File Size Is Calculated

Video size is closely related to bitrate and duration.
A simplified way of thinking about it is:
File Size ≈ Bitrate × Video Duration
If the duration stays the same, lowering the bitrate generally reduces the final file size.
This is why target-size compression often works by calculating an appropriate bitrate for the size you want.
For example, if a video is five minutes long and needs to become significantly smaller, the encoder can estimate how much data should be used each second to stay near the requested final size.

Compress a Video by Percentage

One simple way to choose a target is by percentage.
Imagine your original file is:
100 MB
You could choose:
75% → approximately 75 MB
50% → approximately 50 MB
25% → approximately 25 MB
This is useful when you know roughly how much smaller you want the file to become.
It also automatically scales with the original file.
For example, choosing 50% would mean:
200 MB → approximately 100 MB
or:
80 MB → approximately 40 MB
The target changes naturally depending on the uploaded file size.

Compress a Video to a Specific MB Size

If you already know the limit you need to meet, selecting a size in MB is often easier.
For example:
Original: 250 MB Target: 100 MB
or:
Original: 90 MB Target: 30 MB
Instead of thinking about compression percentages, you simply choose approximately how large the final video should be.
This is particularly useful when uploading files to services with size limits.

Use Dislify's Custom Target Compression

Dislify includes a Custom Target compression option that lets you choose approximately how large your finished video should be.
You can set the target using either:
Percentage of the original file
Approximate target size in MB
The available target range automatically adjusts based on the file you upload.
So if you upload a 100 MB video, the controls are based on that 100 MB original rather than using the same fixed range for every file.
This makes it easier to choose a realistic target.

Example: Compress 200 MB to 100 MB

Suppose you upload a video that is:
200 MB
and want it around:
100 MB
You could choose either:
50% of original size
or:
100 MB
Both represent approximately the same target.
Dislify can then calculate compression settings based on the file and work toward that result.

Example: Compress 100 MB to 25 MB

A much more aggressive reduction would be:
100 MB → 25 MB
That means the final video needs to contain roughly one quarter of the original amount of data.
This level of compression may require noticeable quality reduction depending on the video.
A simple screen recording might still look good.
A high-motion gaming video may show more compression artifacts.
The smaller the requested target becomes, the more compromises the encoder may need to make.

Do Not Choose an Unrealistically Small Target

Technically, you can reduce a video dramatically.
That does not mean you should.
Trying to compress:
500 MB → 10 MB
may require such a low bitrate that the video becomes noticeably blurry or blocky.
A more realistic target can often preserve much better quality.
If your requested size is extremely small compared with the original, consider:
Reducing the resolution
Lowering the frame rate
Trimming unnecessary footage
Using stronger compression
Accepting a slightly larger output file
These changes can help the encoder reach the target without relying entirely on extremely low bitrate.

Resolution Still Matters

Target-size compression primarily focuses on how much data the final file should use.
But resolution can also have a large effect on quality.
A 4K video compressed into a very small file may struggle to preserve all of its detail.
If you do not actually need 4K resolution, converting the video to 1080p can allow the available bitrate to be used more effectively.
Likewise, a 1080p video may sometimes look better at 720p when the required final file size is extremely small.

Frame Rate Can Affect File Size

Higher frame rates mean storing more frames every second.
A 60 FPS recording generally requires more data than a 30 FPS recording to maintain similar visual quality.
If your target size is difficult to reach, reducing the frame rate may help.
This is not always necessary, especially for videos where smooth motion matters, but it can be useful for presentations, tutorials, or simple screen recordings.

Audio Also Uses Part of the File Size

The final video file contains both video and audio data.
When targeting a specific file size, some of the available space must therefore be reserved for audio.
For videos containing mostly speech, extremely high audio bitrates are usually unnecessary.
Reducing the audio bitrate slightly can leave more of the available file size for video quality.

Why Results Can Be Slightly Different From the Target

A target size should generally be treated as an approximation.
If you choose 50 MB, the final result might be:
48 MB
or:
52 MB
There are several reasons for this.
Different videos compress differently, containers add a small amount of overhead, and encoding behavior can vary depending on the content.
The goal is usually to produce a result reasonably close to the requested size while maintaining acceptable quality.

Preview the Compressed Video

Always check the result before deleting your original file.
Pay particular attention to:
Fast movement
Small text
Faces
Dark scenes
Fine details
Gameplay footage
Water, grass, smoke, and particles
These areas often reveal compression artifacts first.
If the video looks noticeably worse than expected, increase the target size slightly and compress it again.

When Should You Use a Preset Instead?

You do not always need a custom target.
A compression preset is often better when you simply want:
A smaller video
Good quality
Fast setup
No particular size requirement
Use Custom Target when you already have a specific size or percentage in mind.
Use a preset when you mainly care about reducing the file without needing to hit a particular number.

Final Thoughts

Compressing a video to a specific file size can save a lot of trial and error.
Instead of repeatedly trying different presets and checking the result, you can start with a clear target such as:
100 MB → 50 MB
or:
200 MB → 40% of the original size
The encoder can then adjust the compression around that goal.
Just remember that target sizes are approximate, and very aggressive reductions may require some loss of visual quality.
The best target is usually the smallest file size that still keeps your video looking good.

Comments

Share your thoughts or questions about this article.

Ready when you are

Put the guide into practice.

Compress a file in the workspace or connect Dislify to your product through the API.