Skip to main content

Compress video by 90% without losing much quality, similar to what Pied Piper achieves.

Project description

Video-compress

Compress video by 90% without losing much quality, similar to what Pied Piper achieves.

Inspired by https://x.com/mortenjust/status/1818027566932136062

Install

First install ffmpeg, then

pip3 install -U video-compress

Or install latest nightly version

pip3 install --force-reinstall -U git+https://github.com/jiacai2050/video-compress.git

This will install two commands: vc{.verbatim}, video-compress{.verbatim}, which are identical.

If you prefer to use uvtool:

uv tool install Video-compress

Usage

usage: vc [-h] [-v] [--verbose] [-t THREADS] [--crf CRF] [--delete]
          [<video path> ...]

Compress video by 90% without losing much quality, similar to what Pied Piper
achieves.

positional arguments:
  <video path>

options:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  --verbose             show verbose log
  -t THREADS, --threads THREADS
                        max threads to use for compression. (default: 6)
  --crf CRF             constant rate factor, range from 0-51. Higher values
                        mean more compression, smaller file size, but lower
                        quality. (default: 30)
  --delete              delete input video after compress successfully

Positional arguments can be either video files or directories.

For each directory, vc{.verbatim} will iteratively walk the dir to search for all videos to compress, the compressed video will be named after ${input}-compressed.mp4{.verbatim}.

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

video_compress-0.3.1.tar.gz (16.8 kB view details)

Uploaded Source

Built Distribution

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

video_compress-0.3.1-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

Details for the file video_compress-0.3.1.tar.gz.

File metadata

  • Download URL: video_compress-0.3.1.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for video_compress-0.3.1.tar.gz
Algorithm Hash digest
SHA256 24cf1c67c655c7d9633053fd8aa72fbd6e597df8f0117d90837cda2c9752fb3e
MD5 ffd21f8ed90da48fc9b77f797fba40cd
BLAKE2b-256 e0e3b944c13456ff198076eb1941ca525fe89ce53fab9d7a6e5f1f04a389cfaf

See more details on using hashes here.

File details

Details for the file video_compress-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: video_compress-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 18.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.13 {"installer":{"name":"uv","version":"0.9.13"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for video_compress-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 47b2627cbbe6948ea45971f2f81e1d113a7cb41171df5dc3f737de04d6fa2d09
MD5 963c7242affa3b97eae8bc5d57238290
BLAKE2b-256 3856b31eea026cec22484d6bf6c5b1a4bbfb2cb9cc1cdb8ce03c7adbac18e6b8

See more details on using hashes here.

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