Fast image & video compression CLI tool
Project description
🗜️ squish
Fast image & video compression CLI tool.
Install
pip install -e .
Requires FFmpeg for video compression:
brew install ffmpeg/sudo apt install ffmpeg
Usage
Compress an image
squish compress photo.jpg -q 60
squish compress photo.png -f webp -q 80
squish compress photo.jpg -r 1920x1080 -q 70
squish compress photo.jpg -r 50%
Compress a video
squish compress video.mp4 -q 70
squish compress video.mp4 -r 1280x720 -q 60
squish compress video.mov -f mp4 -q 75
Batch compress a directory
squish compress ./photos/ -q 60 -f webp
squish compress ./videos/ -q 70 -r 1280x720
Presets
squish compress photo.jpg -p web # 1920x1080, q80
squish compress video.mp4 -p mobile # 720x1280, q65
squish compress photo.jpg -p thumbnail # 400x400, q60
squish compress video.mp4 -p social # 1080x1920, q70
File info
squish info photo.jpg
squish info video.mp4
Options
| Flag | Short | Description |
|---|---|---|
--quality |
-q |
Quality 1-100 (default: 80) |
--resolution |
-r |
Target resolution: 1920x1080 or 50% |
--format |
-f |
Output format: jpg, png, webp, mp4, webm |
--preset |
-p |
Preset: web, mobile, thumbnail, social |
--output |
-o |
Custom output path |
--overwrite |
Overwrite existing files |
How quality maps to compression
Images
- 90-100: Near lossless, minimal size reduction
- 70-89: Good quality, noticeable size reduction
- 40-69: Decent quality, significant compression
- 1-39: Low quality, maximum compression
Videos (CRF mapping)
- quality 100 → CRF 15 (near lossless)
- quality 80 → CRF 23 (good quality)
- quality 50 → CRF 30 (medium)
- quality 1 → CRF 40 (low quality, small file)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file squish_cli-0.1.0.tar.gz.
File metadata
- Download URL: squish_cli-0.1.0.tar.gz
- Upload date:
- Size: 8.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9394d612ae2b19ee30a139de679a19fb1ccac40fc04f04925c0ab18588ba82eb
|
|
| MD5 |
5e160a329c5a7fe7a34c3bb77f0a5963
|
|
| BLAKE2b-256 |
d1c659911ab636dd44190ed41035ef51b0fec6c9fe518becda19ccca157001c3
|
Provenance
The following attestation bundles were made for squish_cli-0.1.0.tar.gz:
Publisher:
workflow.yml on Ayush0054/squish
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
squish_cli-0.1.0.tar.gz -
Subject digest:
9394d612ae2b19ee30a139de679a19fb1ccac40fc04f04925c0ab18588ba82eb - Sigstore transparency entry: 1004280179
- Sigstore integration time:
-
Permalink:
Ayush0054/squish@a14eeaa1632e5f874967dd34fb6cb1e180452322 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Ayush0054
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@a14eeaa1632e5f874967dd34fb6cb1e180452322 -
Trigger Event:
release
-
Statement type:
File details
Details for the file squish_cli-0.1.0-py3-none-any.whl.
File metadata
- Download URL: squish_cli-0.1.0-py3-none-any.whl
- Upload date:
- Size: 9.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
425c2aab0d544816aa89b9a421d764e665b44b4f9446b919c45592803898e367
|
|
| MD5 |
3d73bff18ca279f16f0daef022279168
|
|
| BLAKE2b-256 |
b20115ed3fa33fcfb26fd84f009864a7ecabe66a5ba741b5c4d9615207157986
|
Provenance
The following attestation bundles were made for squish_cli-0.1.0-py3-none-any.whl:
Publisher:
workflow.yml on Ayush0054/squish
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
squish_cli-0.1.0-py3-none-any.whl -
Subject digest:
425c2aab0d544816aa89b9a421d764e665b44b4f9446b919c45592803898e367 - Sigstore transparency entry: 1004280205
- Sigstore integration time:
-
Permalink:
Ayush0054/squish@a14eeaa1632e5f874967dd34fb6cb1e180452322 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Ayush0054
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yml@a14eeaa1632e5f874967dd34fb6cb1e180452322 -
Trigger Event:
release
-
Statement type: