Metadata-Version: 2.4
Name: videolab
Version: 0.6.0
Summary: A CLI for video processing.
Author: Kian-Meng Ang
License: AGPL-3.0-or-later
Classifier: Programming Language :: Python
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: Programming Language :: Python :: 3.14
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE.md
Requires-Dist: av<16.0.0,>=15.1.0
Requires-Dist: Pillow>=10.4.0
Requires-Dist: numpy>=1.26.0
Requires-Dist: tqdm>=4.66.0
Provides-Extra: dev
Requires-Dist: nox; extra == "dev"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-cov; extra == "test"
Requires-Dist: pytest-randomly; extra == "test"
Requires-Dist: pytest-xdist; extra == "test"
Requires-Dist: pytest-mock; extra == "test"
Provides-Extra: lint
Requires-Dist: mypy; extra == "lint"
Requires-Dist: pre-commit; extra == "lint"
Provides-Extra: doc
Requires-Dist: furo; extra == "doc"
Requires-Dist: myst-parser; extra == "doc"
Requires-Dist: sphinx; extra == "doc"
Requires-Dist: sphinx-autobuild; extra == "doc"
Requires-Dist: sphinx-autodoc-typehints; extra == "doc"
Requires-Dist: sphinx-copybutton; extra == "doc"
Dynamic: license-file

# videolab

A CLI for video processing.

## Installation

You can install `videolab` from source.

1.  Clone the repository:

    ```bash
    git clone https://github.com/kianmeng/videolab.git
    cd videolab
    ```

2.  Create a virtual environment and install the package:
    ```bash
    uv venv
    source .venv/bin/activate
    uv pip install -e .
    ```

## Usage

Once installed, you can use the `videolab` command.

To see the help message:

```bash
videolab --help
```

<!--help !-->

```console
usage: videolab [-h] [-V] [-v] {env,scrub,watermark} ...

A console program to manipulate videos.

website: https://github.com/kianmeng/videolab
changelog: https://github.com/kianmeng/videolab/blob/master/CHANGELOG.md
issues: https://github.com/kianmeng/videolab/issues

positional arguments:
  {env,scrub,watermark}
                        sub-command help
    env                 show environment information
    scrub               remove all metadata
    watermark           add a watermark to a video.

options:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  -v, --verbose         enable verbose logging
```

<!--help !-->

### videolab env

```console
videolab env -h
```

<!--help-env !-->

```console
usage: videolab env [-h]

options:
  -h, --help  show this help message and exit
```

<!--help-env !-->

### videolab scrub

```console
videolab scrub -h
```

<!--help-scrub !-->

```console
usage: videolab scrub [-h] [--no-audio] input_file [output_file]

Removes all container-level and stream-level metadata from a video file by
remuxing it

positional arguments:
  input_file   Path to the input video file
  output_file  Path to save the scrubbed video file, defaults:
               '<input_file>_scrubbed.<ext>'

options:
  -h, --help   show this help message and exit
  --no-audio   Remove the audio from the video file
```

<!--help-scrub !-->

### videolab watermark

```console
videolab watermark -h
```

<!--help-watermark !-->

```console
usage: videolab watermark [-h] --text TEXT [--font-size FONT_SIZE]
                          [--font-color FONT_COLOR]
                          [--position {top-left,top-right,bottom-left,bottom-right,center}]
                          [--margin MARGIN]
                          input_file [output_file]

Adds a watermark to a video file.

positional arguments:
  input_file            Path to the input video file
  output_file           Path to save the watermarked video file, defaults:
                        '<input_file>_watermarked.<ext>'

options:
  -h, --help            show this help message and exit
  --text TEXT           The text for the watermark
  --font-size FONT_SIZE
                        Font size for the watermark text. Defaults to 5% of
                        video height.
  --font-color FONT_COLOR
                        Font color in RGBA format (e.g., '255,255,255,128').
  --position {top-left,top-right,bottom-left,bottom-right,center}
                        Position of the watermark.
  --margin MARGIN       Margin from the edges of the video in pixels.
```

<!--help-watermark !-->

## Contributing

Contributions are welcome! Please see the [Contributing](CONTRIBUTING) file for
details on how to set up your development environment and submit pull requests.

## License

This project is licensed under the GNU Affero General Public License v3.0 or
later. See the [License](LICENSE) file for details.
