Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

squish_cli-0.1.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

squish_cli-0.1.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

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

Hashes for squish_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9394d612ae2b19ee30a139de679a19fb1ccac40fc04f04925c0ab18588ba82eb
MD5 5e160a329c5a7fe7a34c3bb77f0a5963
BLAKE2b-256 d1c659911ab636dd44190ed41035ef51b0fec6c9fe518becda19ccca157001c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for squish_cli-0.1.0.tar.gz:

Publisher: workflow.yml on Ayush0054/squish

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for squish_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 425c2aab0d544816aa89b9a421d764e665b44b4f9446b919c45592803898e367
MD5 3d73bff18ca279f16f0daef022279168
BLAKE2b-256 b20115ed3fa33fcfb26fd84f009864a7ecabe66a5ba741b5c4d9615207157986

See more details on using hashes here.

Provenance

The following attestation bundles were made for squish_cli-0.1.0-py3-none-any.whl:

Publisher: workflow.yml on Ayush0054/squish

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page