| Crates.io | compresscli |
| lib.rs | compresscli |
| version | 0.1.2 |
| created_at | 2025-09-14 07:59:19.427319+00 |
| updated_at | 2025-10-06 16:36:08.549713+00 |
| description | A powerful CLI tool for video and image compression |
| homepage | |
| repository | https://github.com/amitxd75/compresscli |
| max_upload_size | |
| id | 1838458 |
| size | 241,658 |
A powerful FFmpeg wrapper CLI built in Rust. Simplifies complex video and image compression and provides batch processing capabilities.
cargo install compresscli
Download from GitHub Releases:
./install.sh./install.shgit clone https://github.com/amitxd75/compresscli.git
cd compresscli
cargo build --release
sudo apt install ffmpegbrew install ffmpegOnly for linux Tab completion for Bash, Zsh, Fish, and PowerShell:
./scripts/setup-completions.sh
# Video compression
compresscli video input.mp4 --preset medium
compresscli video input.mp4 --codec h265 --crf 20
# Image compression
compresscli image photo.jpg --preset web
compresscli image photo.png --format webp --quality 80
# Batch processing
compresscli batch ./videos --videos --preset medium --recursive
compresscli batch ./photos --images --preset web
| Option | Description | Example |
|---|---|---|
--preset |
Compression preset | fast, medium, slow |
--codec |
Video codec | h264, h265, vp9, av1 |
--crf |
Constant Rate Factor (0-51) | --crf 23 |
--bitrate |
Target bitrate | --bitrate 2M |
--resolution |
Target resolution | --resolution 1920x1080 |
--fps |
Target framerate | --fps 30 |
--audio-codec |
Audio codec | aac, mp3, opus |
--no-audio |
Remove audio track | |
--start |
Start time for trimming | --start 00:01:30 |
--end |
End time for trimming | --end 00:05:00 |
--two-pass |
Enable two-pass encoding |
| Option | Description | Example |
|---|---|---|
--preset |
Image preset | web, high, lossless |
--quality |
Image quality (1-100) | --quality 85 |
--format |
Output format | jpeg, png, webp |
--resize |
Resize to dimensions | --resize 1920x1080 |
--max-width |
Maximum width | --max-width 1920 |
--max-height |
Maximum height | --max-height 1080 |
--optimize |
Enable optimization | |
--progressive |
Progressive JPEG | |
--lossless |
Lossless compression |
| Option | Description |
|---|---|
--output-dir |
Output directory |
--overwrite |
Overwrite existing files |
--dry-run |
Preview without executing |
--verbose |
Verbose output |
--jobs |
Parallel jobs (batch mode) |
| Command | Description |
|---|---|
info |
Show system information and dependencies |
presets list |
List all available presets |
presets show <name> |
Show details of a specific preset |
completions <shell> |
Generate shell completion scripts |
CompressCLI uses YAML configuration files located at:
~/.config/compresscli/config.yaml~/Library/Application Support/compresscli/config.yaml%APPDATA%\compresscli\config.yamlvideo_presets:
custom_high:
codec: H265
crf: 18
audio_codec: Aac
audio_bitrate: "256k"
preset: "slow"
two_pass: true
extra_args: []
image_presets:
web_optimized:
quality: 85
optimize: true
progressive: true
lossless: false
default_settings:
parallel_jobs: 4
preserve_metadata: true
backup_originals: false
--preset for quick compression: fast, medium, slow--dry-run to preview operations--jobs N for parallel processingcompresscli info to check FFmpeg installationFFmpeg not found: Install with sudo apt install ffmpeg (Linux) or brew install ffmpeg (macOS)
Permission errors: Use --overwrite or --output-dir ./output
Memory issues: Reduce --jobs or use faster presets
git checkout -b feature-namecargo testThis project is licensed under the MIT License - see the LICENSE file for details.