You filmed a 90 second clip on your phone and it is 180 MB. Your email limit is 25 MB, the chat app will squash it into mush, and the class portal says "file too large". So you search for a free video compressor and almost every result wants the same thing first: upload the whole video to their server.
That is a lot to ask. A video of your kid, your home, your screen with a tab open you forgot about. This guide shows another way. You compress the file inside your own browser, and the video never leaves your computer.
Why video files get so big
A phone records at a very high bitrate because it has to be fast and safe, not small. That means a lot of data per second. When you re-encode a clip with the common H.264 codec at a sensible quality level, you can often drop the size by a big margin and still have a clip that looks fine on a phone or laptop.
Three settings decide most of the result:
- Quality (called CRF in ffmpeg). Higher number means smaller file and more loss. Lower means bigger and cleaner.
- Resolution. A 4K clip sent to a phone screen is wasted pixels. 1080p or 720p is plenty for chat and email.
- Frame rate. Screen recordings often look the same at 24 or even 15 frames per second, and the file gets much smaller.
Step by step in the browser
I use the Video Compressor in OpenFile, a free and open source toolkit I built. It runs ffmpeg compiled to WebAssembly inside a worker in your tab.
- Open https://openfile-studio.vercel.app/video-compressor
- Drop in your video.
- Pick a quality preset and, if you want, a lower resolution. 720p is a good start for email and chat.
- Start the job and wait. You will see progress while it works.
- Download the smaller file.
The first time, the page downloads the ffmpeg engine, so that first run takes a little longer. After that it is cached and later runs start faster.
What to expect on speed
Your own computer does the work, so speed depends on your machine. A modern laptop handles a short clip without trouble. A long 4K video will be slow because the browser has less room to work than a native app. If that is your case, trim first. The trimmer in the same toolkit can cut a clip with a fast mode that does not re-encode, and then you compress only the part you need.
How to check that nothing is uploaded
Open the developer tools in your browser, go to the Network tab and run a clip through. You will see the page files load, and no request carries your video. You can also turn off Wi-Fi after the page loads. It keeps working, because OpenFile installs as an app and runs offline.
Simple settings I use
- Sending to family on a chat app: 720p, medium quality
- Email under 25 MB: 720p, a bit higher compression, and trim the start and end
- Screen recording for a bug report: 24 fps, 1080p
- Archive copy: keep the original, do not compress it
Questions people ask
Will the picture look worse? A little, since this is lossy compression. At sensible settings most people cannot tell on a phone.
Does it add a watermark? No. There is no sign-up, no limit and no watermark.
Can I make a GIF instead? Yes, the same toolkit has a video to GIF tool. Keep it short and narrow, or the GIF ends up bigger than the video.
I wrote about how ffmpeg runs in the browser here: https://openfile-studio.vercel.app/blog/video-in-the-browser-with-webassembly
OpenFile is MIT licensed and the code is on GitHub: https://github.com/aniruddhaadak80/OpenFile
Here is the short demo video if you want to see it in action:
