Video compression (size or bitrate)
Give a size or bitrate budget, derive the video bitrate, scale resolution and frame rate, and really re-encode to WebM in the browser with the actual output size.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Pick a local video (MP4 / WebM / MOV all decode), nothing is uploaded; the output is WebM.
Pick a video file first.
Result
These are the real numbers from this run — play and download them right here.
Pick a video and set the options; the real result shows up here.
Need MP4 or the audio track back?
Browsers can only record WebM, and without audio. The command below is a reference for **ffmpeg on your own machine**: same resolution, frame rate and bitrate, MP4 output with audio.
ffmpeg -i input.mp4 -c:v libx264 -b:v 1200k -vf scale=1280:720 -r 30 -c:a aac -b:a 96k -movflags +faststart output.mp4
That is a command, not a result of this tool: nothing is muxed into MP4 in the browser and its output is not presented as ours.
What this tool does
- A chat app only accepts 10 MB clips: set the target size to 10 MB, the tool derives the bitrate, really compresses in the browser and reports the actual output size
- Bring material to a fixed bitrate before upload: set 800 kbps and both size and quality become predictable
- Rough-compress a long screen recording against a size budget: drop to 480p and 12 fps first, then let the budget pick the bitrate
Example
Input
clip.webm (640×480, about 0.3 s, roughly 30 KB) → target size 10 MB / audio allowance 96 kbps / 30 fps / source resolution
Output
Derived video bitrate 30.00 Mbps (a 10 MB budget is more than a short clip can use, so the bitrate is clamped at the 30 Mbps ceiling); output 640×480 @ 30 fps; estimated size within 1.2 MB; the real recorded size and elapsed time come from the result lines
A very short clip hits the 30 Mbps ceiling, so “estimated output fits the budget” then compares against that ceiling, not the raw budget — the result lines say so explicitly.
Frequently asked questions
How does it differ from Video compression by preset?
This tool needs a **budget** first — target size in MB or target bitrate in kbps — and derives the video bitrate from it. The other one derives the bitrate from a resolution preset plus a quality level, with no size budget. Use this one for “keep it under 10 MB”, the other for “720p at medium quality”. Decoding and recording are identical.
Why is the output still WebM, and why is it silent?
MediaRecorder can only record WebM, and re-encoding goes through canvas capture, which carries picture but no audio track. That is not a bug and nothing is faked: the result lines say the exported WebM has no audio track and show a command for ffmpeg on your machine to mux the audio or produce MP4 (the command is not a result of this tool).
What is the audio allowance for?
It only feeds the size budget: video bitrate = (target bytes × 8 ÷ duration) − audio allowance. Because this browser output has no audio, the real file is usually smaller than the budget; the allowance lets you plan for the combined video-plus-audio size, which matches the budget once you mux the audio back with the command.
Is the bitrate clamped anywhere?
Yes, and the result lines say so: the video bitrate is clamped between 150 kbps and 30 Mbps. With a 0.5 MB budget and a 30-second clip the required bitrate is below the floor, so the tool uses 150 kbps and clearly reports that the estimate exceeds the budget instead of quietly handing you a number it cannot hit.
How long a video can I compress?
Recording follows the wall clock, so a single run is capped at 900 frames (about 30 s at 30 fps). Past that the tool reports the limit and asks you to lower the frame rate or use a shorter clip; long videos belong in local ffmpeg, using the same-parameter command shown on the page.
Keywords:webmvideo compression