Metadata-Version: 2.4
Name: vicompres
Version: 0.2.0
Summary: Efficiently compress video files using ffmpeg
Author-email: Kirill Pechenkin <pechkirill@mail.ru>
License-Expression: MIT
Project-URL: Homepage, https://github.com/pechenkin-ka/vicompres
Project-URL: Repository, https://github.com/pechenkin-ka/vicompres
Project-URL: Issues, https://github.com/pechenkin-ka/vicompres/issues
Keywords: video,compression,ffmpeg,cli
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Multimedia :: Video :: Conversion
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# 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

```bash
pip install vicompres
```

**Prerequisite:** [ffmpeg](https://ffmpeg.org/) must be installed and available in your PATH.

## Usage

```bash
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
