Metadata-Version: 2.3
Name: video-to-chapters-with-transcript
Version: 0.1.0
Summary: AI-powered CLI that generates timestamped chapter summaries for videos using AssemblyAI transcripts and Gemini vision analysis
License: MIT License
         
         Copyright (c) 2026 Harold Martin
         
         Permission is hereby granted, free of charge, to any person obtaining a copy
         of this software and associated documentation files (the "Software"), to deal
         in the Software without restriction, including without limitation the rights
         to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
         copies of the Software, and to permit persons to whom the Software is
         furnished to do so, subject to the following conditions:
         
         The above copyright notice and this permission notice shall be included in all
         copies or substantial portions of the Software.
         
         THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
         IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
         FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
         AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
         LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
         OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
         SOFTWARE.
Requires-Dist: assemblyai>=0.44.3
Requires-Dist: loguru>=0.7.3
Requires-Dist: pillow>=11.0.0
Requires-Dist: click>=8.1.7
Requires-Dist: sqlalchemy>=2.0.36
Requires-Dist: python-dotenv>=1.0.1
Requires-Dist: scikit-image>=0.24.0
Requires-Dist: google-genai>=1.0.0
Requires-Dist: httpx>=0.28.1
Requires-Dist: rich>=13.0.0
Requires-Dist: opencv-python-headless>=4.10.0
Requires-Python: >=3.13
Description-Content-Type: text/markdown

# Video to Chapters (with Transcript)

AI-powered Python library and CLI that automatically generates timestamped chapter summaries for video content.

## Features

- Automatic transcript generation (with speaker labels) using AssemblyAI
- Cheap local scene detection (SSIM + histogram comparison) to find chapter boundaries
- Google Gemini used only where it adds value: describing detected scene changes and writing chapter titles/summaries
- Chapter segmentation based on scene changes and speaker turns
- Export formats for YouTube, Vimeo, Spotify, Markdown, SRT, and JSON

## Requirements

- Python 3.13+
- `ffmpeg` / `ffprobe` on your `PATH`
- API keys for [AssemblyAI](https://www.assemblyai.com/) and [Google Gemini](https://ai.google.dev/) (see `.env.example`)

## Installation

```bash
uv tool install video-to-chapters-with-transcript
```

Or for development:

```bash
git clone https://github.com/hbmartin/video-to-chapters-with-transcript
cd video-to-chapters-with-transcript
uv sync
```

## Usage

```bash
# Process a video end-to-end (transcript, scene detection, chapters)
video-to-chapters process video.mp4

# Choose an output format and save to a file
video-to-chapters process video.mp4 --format youtube --output chapters.txt

# List previously processed videos
video-to-chapters list

# Show chapters for an already-processed video without reprocessing
video-to-chapters show --video-id 1

# Re-segment with a different scene-change threshold (reuses cached AI summaries)
video-to-chapters regenerate --threshold 0.6
```

Run `video-to-chapters --help` for all commands and options.

## Configuration

Copy `.env.example` to `.env` and fill in your API keys:

```dotenv
ASSEMBLYAI_API_KEY=...
GEMINI_API_KEY=...
```

## License

[MIT](LICENSE)
