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

pip install video-compress

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

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.2.0.tar.gz (18.0 kB view hashes)

Uploaded Source

Built Distribution

video_compress-0.2.0-py3-none-any.whl (17.7 kB view hashes)

Uploaded Python 3

Supported by

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