Metadata-Version: 2.4
Name: coloredcaps
Version: 0.1.1
Summary: Generate colored video-style YouTube XML captions
Author: Sam
License-Expression: MIT
Project-URL: Homepage, https://github.com/Breakdown55/coloredcaps
Project-URL: Issues, https://github.com/Breakdown55/coloredcaps/issues
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: opencv-python
Requires-Dist: colorama
Requires-Dist: tqdm
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == "dev"
Requires-Dist: build; extra == "dev"
Requires-Dist: twine; extra == "dev"
Dynamic: license-file

# coloredcaps

Convert a video into colored YouTube XML captions (`.ytt`) made from block
characters.

## Demo (Turn YouTube Captions (CC) on to See the Effect)

[Watch the demo on YouTube!](https://www.youtube.com/watch?v=n_UpMPBBluM)

## Installation

Install coloredcaps from PyPI:

```bash
pip install coloredcaps
```

To install a local copy while developing:

```bash
pip install -e .
```

coloredcaps requires Python 3.10 or newer.

## Usage

```bash
coloredcaps input.mp4
```

This creates `output.ytt` in the current folder.

Choose another output folder:

```bash
coloredcaps input.mp4 --output captions
```

Control the caption resolution and frame rate:

```bash
coloredcaps input.mp4 --cols 30 --fps 8
```

You can specify `--cols`, `--rows`, or let coloredcaps calculate both. The
maximum frame rate is 10 FPS.

To also create a black video containing the original audio:

```bash
coloredcaps input.mp4 --create-video
```

The `--create-video` option requires [FFmpeg](https://ffmpeg.org/) to be
installed and available on your PATH.

## Uploading to YouTube

1. Upload a video to YouTube, preferably the black video created with
   `--create-video`.
2. On the **Details** tab, scroll down and select a video language.
3. Open the **Video elements** tab at the top.
4. Under subtitles, select **Add** and then **Upload file**.
5. Select the generated `output.ytt` file.

Run the following command to see every option:

```bash
coloredcaps --help
```

## License

MIT
