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.3.0.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

video_compress-0.3.0-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: video_compress-0.3.0.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.2

File hashes

Hashes for video_compress-0.3.0.tar.gz
Algorithm Hash digest
SHA256 ac2f4fdb8153db8e9f8758c4b7e93ebee7cc827088330d3257b983078c094833
MD5 90b369611299e870b2e40b23d028f73b
BLAKE2b-256 c40e22a71abd76e4c5331037ec87d8f72dc94bc6e9281cd7945f11fb75d08edd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for video_compress-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 326a3286a1244aa10a05f7493d3e1beb006839791ad405c3f5b300918e2dcc62
MD5 663addb3b1df87f6c497f5ca5be262e6
BLAKE2b-256 9de4cb50443d297e793d3df5013a7aab5d3d324922ec3e84534a2e30f4b90933

See more details on using hashes here.

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