Browser FFmpeg recipe
Reduce Video File Size Online with FFmpeg
Downscale and compress a video for a much smaller output file.
Command
Run this FFmpeg command
ffmpeg -i input.mp4 -vf scale=1280:-2 -c:v libx264 -crf 30 -preset fast -c:a aac -b:a 96k smaller.mp4When to use it
- large phone videos
- support uploads
- social previews
How it works
- Upload the video file.
- Run the command to downscale to 1280px wide and compress with H.264.
- Download the smaller MP4 file.
Option reference
| Option | What it does |
|---|---|
scale=1280:-2 | Sets width to 1280px and keeps a valid even height. |
-crf 30 | Uses stronger compression than the default recipe. |
-b:a 96k | Uses compact audio for smaller output. |
Practical notes
- Use 1920 instead of 1280 if you need a larger HD result.
- If text becomes blurry, lower CRF to 24 or 26.
FAQ
How do I make the output even smaller?
Use a smaller scale width such as 960 and a higher CRF value such as 32.
Why does FFmpeg use -2 for height?
It keeps the aspect ratio and chooses an even height, which avoids codec errors.