Compress a video to a measured MP4 or WebM size
Admin ·
If a video exceeds an attachment limit, its actual exported bytes decide whether it fits. Try the color-card clip to see how a lower frame size and an optional soundtrack affect the result before changing your own file.
Reduce the four-second practice clip
Select Load video example. The source is a 960 × 540 clip that changes from red to blue around two seconds and carries a tone. Choose MP4, set Maximum video long edge to 480 px and Maximum frame rate to 15 fps, then keep audio enabled.
Compress the video. The result should report 480 × 270 pixels. Play through the middle to check the color change and confirm that the sound remains audible.
Download the four-second color-card videoFFmpeg video and audio codec documentation
Set a 250 kbps video bitrate and 240p height cap
Load the four-second color-card clip and choose Video bitrate. Set 250 kbps and a maximum height of 240p, then choose WebM and clear Keep audio. The 960 × 540 source becomes 426 × 240 pixels after rounding to even dimensions. Preview the color changes and save the VP9 WebM.
For a second copy, choose MP4 and select Keep audio. The H.264 picture has the same dimensions and the copy includes AAC audio. A bitrate is a video encoder setting. Compare the saved bytes and total kbps, which also reflect any audio, overhead and the content being encoded.
Download the four-second color-card videoFFmpeg video and audio codec documentationWebM Project container guidelines
Set a file size budget and check the result
Choose Target file size and enter 0.10 MB. This gives the encoder a 100,000-byte budget. Choose WebM and clear Keep audio if you need a silent copy. After encoding, check the Target met or Target missed message and the actual result size.
A budget reserves space for the container and any audio, then converts the remaining bytes into a video bitrate using the clip length. Results vary with the material. Lower the long edge first when a small budget leaves the picture looking rough.
FFmpeg video and audio codec documentationWebM Project container guidelines
Choose the container your destination accepts
The MP4 option writes H.264 video and optional AAC audio. WebM writes VP9 in Video bitrate mode, and VP8 in the quality and size modes. WebM audio uses Opus. Reducing the frame rate helps a slideshow or screen recording, while regular motion can look less fluid. Compare playback in the destination player before discarding any source.
WebM Project container guidelinesFFmpeg video and audio codec documentation
Common questions
Does choosing 250 kbps make exactly a 125 KB file at four seconds?
That arithmetic describes 250,000 bits per second for four seconds, excluding audio and container bytes. The encoder can use fewer video bits for simple scenes. The result shows the actual saved size and average total rate.
Can video compression hit an exact attachment limit?
Check the actual number of exported bytes. The target setting guides the encoder and the result reports whether it fits.
Sources
Put it into practice.
Related guides
- Check a Video Conversion or Stream Copy
- Check the Dimensions of a Compressed MP4
- Check a Trimmed MP4 with Its Audio Track Removed
- Compare Sizes in a Video Batch
- Encode an AVI Clip for a Smaller Download
- Choose a Smaller Output for a Matroska Clip
- Check a VP9 WebM Bitrate Preset
- Compare a Large Video with Its 100 MB Limit
- Check Frame Rate and Playback Duration