A simple command-line tool to quickly compress video using FFmpeg. One command, one param.
- Unix-based system (macOS or Linux)
- curl (pre-installed on most systems)
- sudo privileges
Install with a single command:
curl -sSL https://raw.githubusercontent.com/coolcorexix/compress_video/refs/heads/main/install_compress_video.sh | sudo bash
After installation, you can use the command in two ways:
-
Basic usage (output file will be named automatically):
compress_video input.mp4
This will create
input_compressed.mp4
-
Specify output filename:
compress_video input.mp4 output.mp4
If you see "FFmpeg not found", the script will attempt to install it automatically. If that fails, install FFmpeg manually:
- For macOS:
brew install ffmpeg
- For Ubuntu/Debian:
sudo apt-get install ffmpeg
- For CentOS/RHEL:
sudo yum install ffmpeg
To remove the command:
sudo rm /usr/local/bin/compress_video
If you prefer to inspect the scripts before installation:
-
Download the installation script:
curl -O https://raw.githubusercontent.com/coolcorexix/compress_video/refs/heads/main/install_compress_video.sh
-
Make it executable and run:
chmod +x install_compress_video.sh sudo ./install_compress_video.sh
- The compression uses H.264 codec with default settings
- Original files are not modified; a new compressed file is created
- Compression time depends on the size of the input video