Skip to main content

Efficiently compress video files using ffmpeg

Project description

Vicompres

Vicompres is a CLI tool to efficiently compress video files using ffmpeg. It provides a simple interface for batch-compressing videos with configurable quality levels.

Installation

pip install vicompres

Prerequisite: ffmpeg must be installed and available in your PATH.

Usage

vicompres -d /path/to/videos -c 5

Features

Arguments:

  • -d or --directory: Specify the directory containing the video files to be compressed. By default, it uses the current directory.
  • -c or --compression: Set the compression level (1-10). Higher values result in better compression but may take more time. The default value is 5.
    • compression level is ephemeral — it maps to a specific ffmpeg preset, CRF, and bitrate based on the file extension.
  • -p or --prefix: Define a prefix for the input files to be compressed. Only files that start with the specified prefix will be processed. By default, it processes all files in the directory.
  • -o or --output: Specify the output directory where the compressed files will be saved. If not provided, the compressed files will be saved in the same directory as the input files.
  • -s or --suffix: Add a specific suffix to the output file names. This can help differentiate compressed files from the original ones. By default, compressed suffix is added.
  • -r or --remove-original: If this flag is set, the original files will be deleted after successful compression. By default, original files are retained.
  • -l or --delimiter: Specify a custom delimiter to separate the prefix and suffix in the output file names. The default delimiter is a dot ..

Supported file extensions:

  • .mp4
  • .mkv
  • .avi
  • .mov

Graceful shutdown:

The tool can be gracefully shut down using a keyboard interrupt (Ctrl+C). It will stop processing new files and complete the current compression before exiting.

License

MIT

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

vicompres-0.2.0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file vicompres-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: vicompres-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for vicompres-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ee27964f217718f51694806b3c107e69a3694212692a7c0e886bfa52fe37eee8
MD5 4e1b0954ae07d49fb6230b1fd00664b2
BLAKE2b-256 ea7033b6df9d86fd7c72a64a0ee658d397951f566770ee7e5d4c924eed0d96d2

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