Metadata-Version: 2.4
Name: custom-nbt-startup
Version: 0.1.0
Summary: CLI tool to encode/decode BMW NBT boot animation (.pdds) files
Project-URL: Homepage, https://github.com/BimmerWest/CustomNBT-Startup
Project-URL: Repository, https://github.com/BimmerWest/CustomNBT-Startup
Project-URL: Issues, https://github.com/BimmerWest/CustomNBT-Startup/issues
Author-email: WallaceKoerich <wallacekoerich@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: bmw,boot-animation,dxt1,encoder,nbt,pdds
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
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.11
Requires-Dist: click>=8.1
Requires-Dist: numpy>=1.24
Requires-Dist: opencv-python-headless>=4.8
Requires-Dist: pillow>=10.0
Requires-Dist: python-lzo>=1.15
Description-Content-Type: text/markdown

# CustomNBT-Startup

[![Made with AI](https://img.shields.io/badge/Made%20with-AI-lightgrey?style=for-the-badge)](https://github.com/mefengl/made-by-ai)
[![PyPI](https://img.shields.io/pypi/v/custom-nbt-startup?style=for-the-badge)](https://pypi.org/project/custom-nbt-startup/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow?style=for-the-badge)](LICENSE)

CLI tool to encode custom boot animations for BMW NBT head units.

Converts MP4 videos into the `.pdds` format used by the NBT system for startup animations.

## Requirements

- Python 3.11+
- [uv](https://docs.astral.sh/uv/) (recommended)
- LZO compression library (system dependency)

### Installing LZO

```bash
# macOS
brew install lzo

# Debian/Ubuntu
sudo apt install liblzo2-dev
```

On macOS you need to export the paths so `python-lzo` can find the headers:

```bash
export C_INCLUDE_PATH=$(brew --prefix lzo)/include
export LIBRARY_PATH=$(brew --prefix lzo)/lib
```

You can add these to your shell profile to make them permanent.

## Installation

```bash
# Install from PyPI
pip install custom-nbt-startup

# Or with uv
uv pip install custom-nbt-startup

# Or install from source
uv pip install .
```

## Usage

### Run directly with `uvx` (no install needed)

```bash
# From the project directory
uvx --from . nbt-startup encode my_video.mp4
```

### Run with `uv run`

```bash
uv run nbt-startup encode my_video.mp4
```

### Encode command

```bash
# Basic usage — outputs <video_name>.pdds
nbt-startup encode video.mp4

# Custom output path
nbt-startup encode video.mp4 -o boot_animation.pdds

# Custom frame count (default: 150)
nbt-startup encode video.mp4 -n 200
```

### Options

| Option         | Description                                                  |
| -------------- | ------------------------------------------------------------ |
| `-o, --output` | Output `.pdds` file path (default: `<input_stem>.pdds`)      |
| `-n, --frames` | Number of frames to extract (default: 150)                   |
| `-W, --width`  | Frame width in pixels (default: 1280, must be multiple of 4) |
| `-H, --height` | Frame height in pixels (default: 480, must be multiple of 4) |
| `--version`    | Show version                                                 |
| `--help`       | Show help                                                    |

## License

[MIT](LICENSE)
