Home > Resources > FFmpeg Compress Video

Posted by George Shelley - Feb 24, 2022 | Contact Author

How to Reduce Video File Size with FFmpeg (Command-Line)

In the trend of HD and 4K, videos seems to get larger and larger, while the Internet bandwidth and our hard drives don't always match with the big size. Thus users are trying to reduce video size while converting the video format. FFmpeg, an open source free video transcoder, can make this done indeed. But this tool is command-line only, which means it doesn't have a graphical, clickable interface. Therefore, it's difficult to get to know how to use FFmpeg for video compression.

In this article, we'd like to show you how to use FFmpeg to compress video size without sacrificing (much of) its quality on Windows (Windows 11 included) PCs, also the best FFmpeg alternative to reduce video size without quality loss in a more effective way.

Part 1: How to Compress Video Size with FFmpeg (Command-line) on Windows

To compress videos in FFmpeg, you should make sure the command-line is right. Start with the command-line examples below using FFmpeg.

Step 1. Install FFmpeg on Windows

Download FFmpeg and finish the setup process on your computer. For Windows users, Windows Powershell is recommended over Command-Line. Open Windows Powershell from the start menu, and start with the compression command-line in FFmpeg. For more detailed guide, check for this post "How to Install FFmpeg on Windows".

Step 2. Input video compression command-line

There are a few ways to reduce video size using FFmpeg. You can use a more efficient codec format (H.265 compresses data 30% smaller than H.264), lower bitrate or fps, shorter video length. Here we take some typical command-line examples to show you how to compress MP4/MOV/4K/MKV video size using FFmpeg.

Command-line - Compress and Convert H.264 to H.265 for Higher Compression
ffmpeg -i input.mp4 -vcodec libx265 -crf 28 output.mp4

Command-line - Compress and Convert MP4 to Webm for YouTube, Ins, Facebook
ffmpeg -i source.mp4 -c:v libvpx-vp9 -b:v 0.33M -c:a libopus -b:a 96k \

-filter:v scale=960x540 target.webm

Command-line - Compress and Convert MP4 to WMV
ffmpeg -i input.mp4 -b 1000k -vcodec wmv2 -acodec wmav2 -crf 19 -filter:v fps=fps=24 output.wmv

Command-line -Set CRF in FFmpeg to Reduce Video File Size
ffmpeg -i input.mp4 -vcodec libx264 -crf 24 output.mp4

Command-line - Reduce video frame size to make 4K/1080P FHD video smaller
ffmpeg -i input.avi -vf scale=1280:720 output.avi

Compress Video using FFmpeg

To make the command line clearer, below are what some common FFmpeg command-line options specify, including -c:v, -b:v, -c:a, -b:a, CRF. These options are frequently used for reducing video size in FFmpeg.

-c:v: video codec
-b:v: video bitrate
-c:a: audio codec
-b:a: audio bitrate
-filter:v: a filter to video stream
-f is used to explicitly specify the container format, -f mp4, -f wmv, -f webm, etc.

CRF (Constant Rate Factor): set the CRF to lower the bit rate but retain better quality. The lower crf, the higher the bitrate. According to test, setting crf to 24 reduce a 250MB video to 70MB without losing the quality noticeably. Use ffmpeg -i input.avi -vcodec libx264 -crf 24 output.avi, a 1GB video can be compressed to 200MB.

Step 3. Start reducing video file size in FFmpeg

Hit enter and the video compression process should begin. Now, FFmpeg is running to do the video compression job. The video processing progress is showing at the bottom. Tips: compressing 4K UHD videos in FFmpeg is CPU intensive, you'd better shut down other programs running background on your device.

Step 4. Done!

When the video compression completes, the output video file should appear at your specified location. Check for the output video file size and figure out the FFmpeg video compression ratio.

Part 2: Best FFmpeg Alternative to Reduce Video Size without Losing Quality

For many novice users, FFmpeg is not easy to get started. To make your video compression easier and more efficient, you can adopt EaseFab Video Converter for help. It's a 100% clean and safe software to fullfill common video compression and conversion needs, especially for those newbies who are not skilled with software or computer. It is simple in interface but comprehensive in functionality. Here, as a superb video compressor for Windows and Mac, it can help downsize videos including but not limited to MP4, MKV, WMV, MOV, M4V, MTS, etc. up to 4K quite easily by changing the 3 elements, say adjusting video parameters, converting coding format and cutting unwanted parts being the factors that determines the size of a video file. Which makes it better than other video compressors out the market including FFmpeg, HandBrake and VLC. So, let's take a look at how it shrinks video file size.

Step 1. Free download EaseFab Video Converter on Windows or macOS, install and launch it on your computer.

Step 2. Click on "Add Video" button on the main UI to add an video you want to reduce the file size.

Reduce video size with best FFmpeg alternative

Step 3. Set the parameters that determine the size of a video.

EaseFab Video Converter provide 3 common ways to help you compress MP4 video size. Below, we'll explain the details on how to do these.

Option ① - Reduce Video File Size with Advanced Settings

Video and audio files have their own codecs, which make them different from other files in size. When we want to reduce MP4 file size, we can also change the codecs of the video file to make the file smaller. Speaking of changing the codecs, we're mainly talk about changing bit rate, resolution or frame rate of the video file. Therefore, if you want to reduce video file size, you can click "Settings" button to adjust video audio parameters, for example, downscale 4K resolution to 1920×1080 pixels, lower video frame rate, bit rate, or change aspect ratio and so on.

Changing Bitrate: The size of the video file can be decreased by lowering its bitrate. Bit rate size is directly proportional to file size, and thus, reducing one will reduce the other as well. But here it needs to be understood that too much lowering of the bit rate will reduce the quality as well. Thus reducing the bit rate by 20-30% of the original size is a good choice.

Changing the resolution of the file: The resolution of any file determines its size as well as quality. A high-resolution file will have good quality and larger file size. Thus, if you are aiming to reduce file size, reducing the resolution with a video resolution reducer will do the trick. If you have HD videos with a high resolution of 1080P, you can reduce it to a lower resolution to reduce the file size.

Changing frame rate: Another aspect that can be considered while reducing MP4 file size is to reduce the frame rate of the file. The frame rate is directly related to file size, and thus, reducing one will directly affect the other.

Reduce Video File Size with Advanced Settings

Option ② - Compress videos by Trimming and Cropping Unwanted Part of Video

Another solution to reduce the size of the video file is by trimming and cutting its unwanted parts. To do this, you can click the pencil-like "Edit" button and swith to "Trim" tab to cut unwanted segments of your video. For details, go to guide of how to trim video to learn more.

Compress videos by Trimming and Cropping Unwanted Part of Video

Option ③ - Shrink MP4 videos by converting it a lighter format

You can click "Format" bar and find "Common Video" and then select HEVC MP4 as the output format as HEVC coding format has higher compression ration.

Shrink MP4 videos by converting

Step 3: Compress your video file now!

When everything is OK, you can simply hit "Convert" button to start compressing your video with this video compressor.

Other Useful How-to Guides & Tips


George Shelley

George Shelley is a self-motivated, creative editor with six years of experience covering video transcoding, video editing, software review and how-tos. He is more like a "tech support" with adventurous soul, eagerly grabbing cutting-edge video technologies off in a professional yet easy-to-understand way.

Home > Resources > Reduce File Size of MP4 Video

Copyright © 2024 EaseFab Software Corporation. All Rights Reserved.