Forum Discussion
Best video compressor for mac to reduce the file size of video?
If your only goal is to compress mp4 video on Mac as quickly and efficiently as possible, using h264_videotoolbox is a fantastic choice.
if you have a supported Mac (any Intel with QuickSync or Apple Silicon), you can replace:
-c:v libx264 with -c:v h264_videotoolbox
A basic command would be:
bash
ff mpeg -i input.mp4 -c:v h264_videotoolbox -b:v 2000k -c:a aac -b:a 128k output.mp4
Here is what the key parameter means:
- -b:v 5M: This sets the video bitrate, which is the primary control for file size and quality. A higher bitrate (e.g., 5M or 8M) will result in better quality but a larger file.
If you choose this path for its speed, you can improve the output quality:
- Increase the Bitrate: Since -crf isn't an option, the most direct way to improve quality is to increase the bitrate. For 1080p video, a bitrate of at least 5 Mbps is a good starting point, and you may want to go up to 8 Mbps or higher for better quality.
- Fine-tune with Additional Parameters: You can use a Variable Bitrate (VBR) setup to better allocate bits to complex scenes:
bash
ff mpeg -i input.mp4 -c:v h264_videotoolbox -b:v 5M -maxrate 8M -bufsize 10M -c:a aac output.mp4
3.Fallback to Software Encoding: Since the VideoToolbox encoder might not be available or could produce unsatisfactory results, it's wise to have a backup plan with software encoding.
Since you said “I just want to compress MP4 video on Mac” and mentioned GPU acceleration, I’d say:
- Use h264_videotoolbox if you’re compressing a long video (e.g., >30 min) and don’t mind a slightly larger output.
- Use libx264 if file size is critical and you can let it run overnight.